From 3e8500d466b641ef34c24f8b0de8163a44ba7a9e Mon Sep 17 00:00:00 2001 From: jackyzha0 Date: Fri, 5 Mar 2021 22:17:18 -0800 Subject: refactoring css --- frontend/src/components/PasteInfo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'frontend/src/components/PasteInfo.js') diff --git a/frontend/src/components/PasteInfo.js b/frontend/src/components/PasteInfo.js index bab7e23..114d0e1 100644 --- a/frontend/src/components/PasteInfo.js +++ b/frontend/src/components/PasteInfo.js @@ -1,7 +1,7 @@ import React from 'react'; import styled from 'styled-components' import { useHistory } from 'react-router-dom'; -import { ThemeInput } from './Inputs' +import { Theme } from './Inputs' import { exportComponentAsPNG } from "react-component-export-image"; const Bold = styled.span` @@ -68,7 +68,7 @@ const PasteInfo = (props) => { save png {renderable()} - -- cgit v1.2.3 From 75e8bdd2d4cdaefe28ed40a7735c993f98d15754 Mon Sep 17 00:00:00 2001 From: jackyzha0 Date: Sat, 6 Mar 2021 16:32:09 -0800 Subject: refactor form -> common --- frontend/src/components/PasteInfo.js | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'frontend/src/components/PasteInfo.js') diff --git a/frontend/src/components/PasteInfo.js b/frontend/src/components/PasteInfo.js index 114d0e1..cb48b20 100644 --- a/frontend/src/components/PasteInfo.js +++ b/frontend/src/components/PasteInfo.js @@ -3,6 +3,7 @@ import styled from 'styled-components' import { useHistory } from 'react-router-dom'; import { Theme } from './Inputs' import { exportComponentAsPNG } from "react-component-export-image"; +import {Button} from "./Common/Button"; const Bold = styled.span` font-weight: 700 @@ -13,14 +14,11 @@ 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; ` -const SpacedText = styled.span` +const SpacedText = styled.p` margin-right: 1em; ` @@ -28,7 +26,6 @@ const Flex = styled.div` float: right; display: flex; flex-direction: row; - transform: translateY(0.2em); ` const PasteInfo = (props) => { @@ -42,12 +39,12 @@ const PasteInfo = (props) => { const buttonTxt = props.isRenderMode ? 'text' : 'render' if (props.lang === 'latex' || props.lang === 'markdown') { return ( - + ); } } @@ -55,18 +52,18 @@ const PasteInfo = (props) => { return (
- - + {renderable()} Date: Sat, 6 Mar 2021 17:07:28 -0800 Subject: fix button dropdown height --- frontend/src/components/PasteInfo.js | 7 ------- 1 file changed, 7 deletions(-) (limited to 'frontend/src/components/PasteInfo.js') diff --git a/frontend/src/components/PasteInfo.js b/frontend/src/components/PasteInfo.js index cb48b20..25afbc9 100644 --- a/frontend/src/components/PasteInfo.js +++ b/frontend/src/components/PasteInfo.js @@ -2,7 +2,6 @@ import React from 'react'; import styled from 'styled-components' import { useHistory } from 'react-router-dom'; import { Theme } from './Inputs' -import { exportComponentAsPNG } from "react-component-export-image"; import {Button} from "./Common/Button"; const Bold = styled.span` @@ -58,12 +57,6 @@ const PasteInfo = (props) => { onClick={redirRaw}> view raw - exportComponentAsPNG(props.compref, `paste-${props.hash}.png`)}> - save png - {renderable()} Date: Sat, 6 Mar 2021 17:15:36 -0800 Subject: revert paste info span --- frontend/src/components/PasteInfo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'frontend/src/components/PasteInfo.js') diff --git a/frontend/src/components/PasteInfo.js b/frontend/src/components/PasteInfo.js index 25afbc9..6ab5b19 100644 --- a/frontend/src/components/PasteInfo.js +++ b/frontend/src/components/PasteInfo.js @@ -17,7 +17,7 @@ const ShiftedButton = styled(Button)` margin-top: 1.6em !important; ` -const SpacedText = styled.p` +const SpacedText = styled.span` margin-right: 1em; ` -- cgit v1.2.3