diff options
Diffstat (limited to 'packages/dev-tools-pages/ts/components/InlineCode.tsx')
-rw-r--r-- | packages/dev-tools-pages/ts/components/InlineCode.tsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/dev-tools-pages/ts/components/InlineCode.tsx b/packages/dev-tools-pages/ts/components/InlineCode.tsx new file mode 100644 index 000000000..9f25927cd --- /dev/null +++ b/packages/dev-tools-pages/ts/components/InlineCode.tsx @@ -0,0 +1,15 @@ +import * as React from 'react'; +import styled from 'styled-components'; +import { colors } from '../variables'; + +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.3125rem; +`; + +export default InlineCode; |