diff options
| author | Jacky Zhao <[email protected]> | 2021-03-06 17:57:24 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-03-06 17:57:24 -0800 |
| commit | 5dd02b5c2acd7a4c408ce9ffa1d95e208d20bbc8 (patch) | |
| tree | 5a09bea364331dd0f41510153924065b815b702e /frontend/src/components/PasteInfo.js | |
| parent | fix(typo): public api docs endpoint (diff) | |
| parent | fix password modal (diff) | |
| download | ctrl-v-5dd02b5c2acd7a4c408ce9ffa1d95e208d20bbc8.tar.xz ctrl-v-5dd02b5c2acd7a4c408ce9ffa1d95e208d20bbc8.zip | |
Merge pull request #70 from jackyzha0/visual-overhaul
Diffstat (limited to 'frontend/src/components/PasteInfo.js')
| -rw-r--r-- | frontend/src/components/PasteInfo.js | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/frontend/src/components/PasteInfo.js b/frontend/src/components/PasteInfo.js index bab7e23..6ab5b19 100644 --- a/frontend/src/components/PasteInfo.js +++ b/frontend/src/components/PasteInfo.js @@ -1,8 +1,8 @@ import React from 'react'; import styled from 'styled-components' import { useHistory } from 'react-router-dom'; -import { ThemeInput } from './Inputs' -import { exportComponentAsPNG } from "react-component-export-image"; +import { Theme } from './Inputs' +import {Button} from "./Common/Button"; const Bold = styled.span` font-weight: 700 @@ -13,10 +13,7 @@ const StyledDiv = styled.div` margin: 2em 0; ` -const Button = styled.button` - margin-right: 0 !important; - margin-left: 2em !important; - height: calc(16px + 1.6em); +const ShiftedButton = styled(Button)` margin-top: 1.6em !important; ` @@ -28,7 +25,6 @@ const Flex = styled.div` float: right; display: flex; flex-direction: row; - transform: translateY(0.2em); ` const PasteInfo = (props) => { @@ -42,12 +38,12 @@ const PasteInfo = (props) => { const buttonTxt = props.isRenderMode ? 'text' : 'render' if (props.lang === 'latex' || props.lang === 'markdown') { return ( - <Button - className="lt-shadow lt-hover" + <ShiftedButton + secondary type="button" onClick={props.toggleRenderCallback}> {buttonTxt} - </Button> + </ShiftedButton> ); } } @@ -55,20 +51,14 @@ const PasteInfo = (props) => { return ( <div> <Flex> - <Button - className="lt-shadow lt-hover" + <ShiftedButton + secondary type="button" onClick={redirRaw}> view raw - </Button> - <Button - className="lt-shadow lt-hover" - type="button" - onClick={() => exportComponentAsPNG(props.compref, `paste-${props.hash}.png`)}> - save png - </Button> + </ShiftedButton> {renderable()} - <ThemeInput + <Theme value={props.theme} onChange={props.onChange} id="themeInput" /> |