{children};
})`
background: ${p => p.theme.colors.codeBg};
color: ${p => p.theme.colors.code};
font-family: ${p => p.theme.fonts.code};
font-size: ${p => p.theme.fontSizes.small};
border-radius: ${p => p.theme.spacing.xs};
display: inline-block;
vertical-align: baseline;
font-variant-ligatures: none;
font-feature-settings: normal;
padding: 0 0.2em;
margin: 0;
a > & {
text-decoration: underline;
}
`;
const InlineImage = styled.img`
display: inline-block;
margin: 0 ${p => p.theme.spacing.sm} ${p => p.theme.spacing.md} 0;
padding: ${p => p.theme.spacing.xs} ${p => p.theme.spacing.sm};
border: 1px solid ${p => p.theme.colors.border};
border-radius: ${p => p.theme.spacing.xs};
`;
const ImageWrapper = styled.div`
margin: ${p => p.theme.spacing.md} 0;
border: 1px solid ${p => p.theme.colors.border};
border-radius: ${p => p.theme.spacing.xs};
background: ${p => p.theme.colors.bg};
display: flex;
flex-direction: column;
& > img {
padding: ${p => p.theme.spacing.md};
align-self: center;
max-height: 40vh;
}
`;
const ImageAlt = styled.span.attrs(() => ({
'aria-hidden': true, // This is just duplicating alt
}))`
display: block;
padding: ${p => p.theme.spacing.xs} ${p => p.theme.spacing.sm};
border-top: 1px solid ${p => p.theme.colors.border};
background: ${p => p.theme.colors.codeBg};
font-size: ${p => p.theme.fontSizes.small};
`;
const Image = props => {
const { height, width, alt, src } = props;
if (height || width) return
{tokens.map((line, i) => (
{line.map((token, key) => (
))}
))}
)}