From 881655bb57e93fa1cf344585cda1653c995f1411 Mon Sep 17 00:00:00 2001 From: August Skare Date: Mon, 19 Nov 2018 15:18:07 +0100 Subject: separate component for inlinecode component --- packages/dev-tools-pages/ts/components/InlineCode.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'packages/dev-tools-pages') 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) => {children})` +const Code: React.StatelessComponent = ({ isAlt, children, ...props }) => ( + {children} +); + +const InlineCode = styled(Code)` background-color: ${props => (props.isAlt ? '#E5E8E9' : colors.blueGray)}; padding: 0.3125rem; `; -- cgit v1.2.3