aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-tools-pages
diff options
context:
space:
mode:
authorAugust Skare <post@augustskare.no>2018-10-26 15:23:09 +0800
committerAugust Skare <post@augustskare.no>2018-10-26 15:23:09 +0800
commit74f05153704d4a9cff355fd8b322b98a1805638c (patch)
treece5274f2cb9ac864c04314c6936a166468982d20 /packages/dev-tools-pages
parentf17c7e4a22c4a11056251598a11b0ffb31804b73 (diff)
downloaddexon-sol-tools-74f05153704d4a9cff355fd8b322b98a1805638c.tar
dexon-sol-tools-74f05153704d4a9cff355fd8b322b98a1805638c.tar.gz
dexon-sol-tools-74f05153704d4a9cff355fd8b322b98a1805638c.tar.bz2
dexon-sol-tools-74f05153704d4a9cff355fd8b322b98a1805638c.tar.lz
dexon-sol-tools-74f05153704d4a9cff355fd8b322b98a1805638c.tar.xz
dexon-sol-tools-74f05153704d4a9cff355fd8b322b98a1805638c.tar.zst
dexon-sol-tools-74f05153704d4a9cff355fd8b322b98a1805638c.zip
alernate prop on inlinecode component
Diffstat (limited to 'packages/dev-tools-pages')
-rw-r--r--packages/dev-tools-pages/ts/components/Compiler.tsx2
-rw-r--r--packages/dev-tools-pages/ts/components/InlineCode.tsx10
2 files changed, 9 insertions, 3 deletions
diff --git a/packages/dev-tools-pages/ts/components/Compiler.tsx b/packages/dev-tools-pages/ts/components/Compiler.tsx
index a5b92da13..995a53e89 100644
--- a/packages/dev-tools-pages/ts/components/Compiler.tsx
+++ b/packages/dev-tools-pages/ts/components/Compiler.tsx
@@ -45,7 +45,7 @@ const cards = [
title: 'Project-centric',
body: (
<React.Fragment>
- It can compile an entire project instead of only individual <InlineCode>.sol</InlineCode> files
+ It can compile an entire project instead of only individual <InlineCode alt>.sol</InlineCode> files
</React.Fragment>
),
},
diff --git a/packages/dev-tools-pages/ts/components/InlineCode.tsx b/packages/dev-tools-pages/ts/components/InlineCode.tsx
index bfbaeb395..4b5afa95c 100644
--- a/packages/dev-tools-pages/ts/components/InlineCode.tsx
+++ b/packages/dev-tools-pages/ts/components/InlineCode.tsx
@@ -1,8 +1,14 @@
+import * as React from 'react';
import styled from 'styled-components';
import { colors } from '../variables';
-const InlineCode = styled.code`
- background-color: ${colors.blueGray}
+interface InlineCodeProps {
+ alt?: boolean;
+ children: React.ReactNode;
+}
+
+const InlineCode = styled(({ alt, children, ...props }: InlineCodeProps) => <code {...props}>{children}</code>)`
+ background-color: ${props => (props.alt ? '#E5E8E9' : colors.blueGray)};
padding: 0.1875rem;
`;