aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-tools-pages/ts/components/InlineCode.tsx
blob: 4b5afa95c09442841beca715515feaa3a3f63a2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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.1875rem;
`;

export default InlineCode;