aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/PasteInfo.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/PasteInfo.js')
-rw-r--r--frontend/src/components/PasteInfo.js30
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" />