diff options
author | August Skare <post@augustskare.no> | 2018-10-22 15:11:37 +0800 |
---|---|---|
committer | August Skare <post@augustskare.no> | 2018-10-22 15:11:37 +0800 |
commit | 12087b6b70862a7b5d1954119ac5b5a06e6179f0 (patch) | |
tree | 481134bb76ffedf1b1d26535f9e461d0ed2814b6 /packages/dev-tools-pages/ts | |
parent | 15a3c234c552c3e32e76411acaefa49f312c0aed (diff) | |
download | dexon-sol-tools-12087b6b70862a7b5d1954119ac5b5a06e6179f0.tar dexon-sol-tools-12087b6b70862a7b5d1954119ac5b5a06e6179f0.tar.gz dexon-sol-tools-12087b6b70862a7b5d1954119ac5b5a06e6179f0.tar.bz2 dexon-sol-tools-12087b6b70862a7b5d1954119ac5b5a06e6179f0.tar.lz dexon-sol-tools-12087b6b70862a7b5d1954119ac5b5a06e6179f0.tar.xz dexon-sol-tools-12087b6b70862a7b5d1954119ac5b5a06e6179f0.tar.zst dexon-sol-tools-12087b6b70862a7b5d1954119ac5b5a06e6179f0.zip |
ligt theme on code
Diffstat (limited to 'packages/dev-tools-pages/ts')
-rw-r--r-- | packages/dev-tools-pages/ts/components/Code.tsx | 8 | ||||
-rw-r--r-- | packages/dev-tools-pages/ts/components/Trace.tsx | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/packages/dev-tools-pages/ts/components/Code.tsx b/packages/dev-tools-pages/ts/components/Code.tsx index 63c9d369b..31ab421be 100644 --- a/packages/dev-tools-pages/ts/components/Code.tsx +++ b/packages/dev-tools-pages/ts/components/Code.tsx @@ -7,6 +7,7 @@ import BaseButton from './Button'; interface CodeProps { children: React.ReactNode; language?: string; + light?: boolean; } interface CodeState { @@ -27,7 +28,8 @@ const Base = CodeProps > ` color: ${props => (props.language === undefined ? colors.white : 'inherit')}; - background-color: ${props => (props.language === undefined ? colors.black : colors.lightGray)}; + background-color: ${props => + props.light ? 'rgba(255,255,255,.15)' : props.language === undefined ? colors.black : colors.lightGray}; white-space: ${props => (props.language === undefined ? 'nowrap' : '')}; position: relative; &:hover ${Button} { @@ -92,10 +94,10 @@ class Code extends React.Component<CodeProps, CodeState> { }; render() { - const { language, children } = this.props; + const { language, light, children } = this.props; return ( - <Base language={language}> + <Base language={language} light={light}> <StyledPre> {this.state.hlCode !== undefined ? ( <StyledCode dangerouslySetInnerHTML={{ __html: this.state.hlCode }} /> diff --git a/packages/dev-tools-pages/ts/components/Trace.tsx b/packages/dev-tools-pages/ts/components/Trace.tsx index 30fdb7066..4d399daa5 100644 --- a/packages/dev-tools-pages/ts/components/Trace.tsx +++ b/packages/dev-tools-pages/ts/components/Trace.tsx @@ -28,7 +28,7 @@ function Trace(props: Props) { Every time an Ethereum transaction fails, it's extremely hard to trace down the troublemaking line of code. The only hint you'll get is a generic error. </MainCopy> - <Code>Error: VM Exception while processing transaction: rever</Code> + <Code light>Error: VM Exception while processing transaction: rever</Code> <List> <Item> |