aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-tools-pages
diff options
context:
space:
mode:
authorAugust Skare <post@augustskare.no>2018-11-19 22:18:07 +0800
committerAugust Skare <post@augustskare.no>2018-11-19 22:18:07 +0800
commit881655bb57e93fa1cf344585cda1653c995f1411 (patch)
tree7fa16dcce14d0edcab4b78c4b08739670856150a /packages/dev-tools-pages
parent38949f7ea4f69c58f7b8646cb360981ea5b6d6ee (diff)
downloaddexon-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.tsx6
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;
`;