diff options
author | August Skare <post@augustskare.no> | 2018-11-16 18:05:30 +0800 |
---|---|---|
committer | August Skare <post@augustskare.no> | 2018-11-16 18:05:30 +0800 |
commit | 54bd7df900316504e4403bc94cffd92930a6c763 (patch) | |
tree | 7b386224e5746be65bfddc094cc5b26f7c018e19 /packages/dev-tools-pages/ts/components/InlineCode.tsx | |
parent | 5afef5fe820674abfbdf58226ed0a6920b5c74f7 (diff) | |
download | dexon-sol-tools-54bd7df900316504e4403bc94cffd92930a6c763.tar dexon-sol-tools-54bd7df900316504e4403bc94cffd92930a6c763.tar.gz dexon-sol-tools-54bd7df900316504e4403bc94cffd92930a6c763.tar.bz2 dexon-sol-tools-54bd7df900316504e4403bc94cffd92930a6c763.tar.lz dexon-sol-tools-54bd7df900316504e4403bc94cffd92930a6c763.tar.xz dexon-sol-tools-54bd7df900316504e4403bc94cffd92930a6c763.tar.zst dexon-sol-tools-54bd7df900316504e4403bc94cffd92930a6c763.zip |
fix linting + code syntax for statless components
Diffstat (limited to 'packages/dev-tools-pages/ts/components/InlineCode.tsx')
-rw-r--r-- | packages/dev-tools-pages/ts/components/InlineCode.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/dev-tools-pages/ts/components/InlineCode.tsx b/packages/dev-tools-pages/ts/components/InlineCode.tsx index 9f25927cd..00e625d66 100644 --- a/packages/dev-tools-pages/ts/components/InlineCode.tsx +++ b/packages/dev-tools-pages/ts/components/InlineCode.tsx @@ -1,15 +1,16 @@ import * as React from 'react'; import styled from 'styled-components'; + import { colors } from '../variables'; interface InlineCodeProps { - alt?: boolean; + isAlt?: boolean; children: React.ReactNode; } -const InlineCode = styled(({ alt, children, ...props }: InlineCodeProps) => <code {...props}>{children}</code>)` - background-color: ${props => (props.alt ? '#E5E8E9' : colors.blueGray)}; +const InlineCode = styled(({ isAlt, children, ...props }: InlineCodeProps) => <code {...props}>{children}</code>)` + background-color: ${props => (props.isAlt ? '#E5E8E9' : colors.blueGray)}; padding: 0.3125rem; `; -export default InlineCode; +export { InlineCode }; |