diff options
author | August Skare <post@augustskare.no> | 2018-11-19 22:18:07 +0800 |
---|---|---|
committer | August Skare <post@augustskare.no> | 2018-11-19 22:18:07 +0800 |
commit | 881655bb57e93fa1cf344585cda1653c995f1411 (patch) | |
tree | 7fa16dcce14d0edcab4b78c4b08739670856150a /packages/dev-tools-pages | |
parent | 38949f7ea4f69c58f7b8646cb360981ea5b6d6ee (diff) | |
download | dexon-sol-tools-881655bb57e93fa1cf344585cda1653c995f1411.tar dexon-sol-tools-881655bb57e93fa1cf344585cda1653c995f1411.tar.gz dexon-sol-tools-881655bb57e93fa1cf344585cda1653c995f1411.tar.bz2 dexon-sol-tools-881655bb57e93fa1cf344585cda1653c995f1411.tar.lz dexon-sol-tools-881655bb57e93fa1cf344585cda1653c995f1411.tar.xz dexon-sol-tools-881655bb57e93fa1cf344585cda1653c995f1411.tar.zst dexon-sol-tools-881655bb57e93fa1cf344585cda1653c995f1411.zip |
separate component for inlinecode component
Diffstat (limited to 'packages/dev-tools-pages')
-rw-r--r-- | packages/dev-tools-pages/ts/components/InlineCode.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/dev-tools-pages/ts/components/InlineCode.tsx b/packages/dev-tools-pages/ts/components/InlineCode.tsx index 00e625d66..561666b0f 100644 --- a/packages/dev-tools-pages/ts/components/InlineCode.tsx +++ b/packages/dev-tools-pages/ts/components/InlineCode.tsx @@ -8,7 +8,11 @@ interface InlineCodeProps { children: React.ReactNode; } -const InlineCode = styled(({ isAlt, children, ...props }: InlineCodeProps) => <code {...props}>{children}</code>)` +const Code: React.StatelessComponent<InlineCodeProps> = ({ isAlt, children, ...props }) => ( + <code {...props}>{children}</code> +); + +const InlineCode = styled(Code)` background-color: ${props => (props.isAlt ? '#E5E8E9' : colors.blueGray)}; padding: 0.3125rem; `; |