Skip to content

Commit

Permalink
fix: index
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-kallavus committed Jan 22, 2021
1 parent 6a6b7ac commit a857d4f
Showing 1 changed file with 24 additions and 28 deletions.
52 changes: 24 additions & 28 deletions docs/src/components/code/index.tsx
Expand Up @@ -15,6 +15,7 @@ import * as Notifications from '@heathmont/moon-notifications';
import * as Popover from '@heathmont/moon-popover';
import * as Accordion from '@heathmont/moon-accordion';
import { useTheme } from '@heathmont/moon-themes';
import { avertaStd } from '@heathmont/moon-fonts';

import { prismTheme } from './prism';

Expand All @@ -24,35 +25,30 @@ type CodeProps = {
'react-live'?: boolean;
};

const CodeWrapper = styled.div(
({ theme: { border, color, radius, space } }) => ({
display: 'block',
border,
borderColor: color.beerus[100],
borderRadius: Utils.rem(radius.small),
position: 'relative',
// overflow: 'hidden',
'.prism-code:focus': {
outline: 'none',
boxShadow: `inset 0 0 3px ${color.piccolo[100]}`,
},
pre: {
padding: Utils.rem(space.default),
overflow: 'auto',
marginBottom: '0',
},
})
);
const CodeWrapper = styled.div({
display: 'block',
border: '1px solid #31373F',
borderRadius: Utils.rem(2),
position: 'relative',
// overflow: 'hidden',
'.prism-code:focus': {
outline: 'none',
boxShadow: 'inset 0 0 3px red',
},
pre: {
padding: Utils.rem(16),
overflow: 'auto',
marginBottom: '0',
},
});

const CodePreview = styled.div(
({ theme: { border, color, fontFamily, space } }) => ({
padding: Utils.rem(space.large),
minHeight: Utils.rem(space.large),
fontFamily,
borderBottom: border,
borderColor: color.beerus[100],
})
);
const CodePreview = styled.div({
padding: Utils.rem(32),
minHeight: Utils.rem(32),
fontFamily: avertaStd.fontStack,
borderBottom: '1px solid #31373F',
borderColor: '#31373F',
});

export const Code = ({ codeString, ...props }: CodeProps) => {
return (
Expand Down

0 comments on commit a857d4f

Please sign in to comment.