Skip to content

Commit

Permalink
Revert "remove unneeded typecast"
Browse files Browse the repository at this point in the history
This reverts commit 3975d93.
  • Loading branch information
hobbes7878 committed Jun 27, 2023
1 parent 3975d93 commit 602a01a
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions code/ui/blocks/src/components/Source.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
import type { ComponentProps, FunctionComponent } from 'react';
import { ThemeProvider, convert, ignoreSsrWarning, styled, themes } from '@storybook/theming';

import React from 'react';
import { styled, ThemeProvider, convert, themes, ignoreSsrWarning } from '@storybook/theming';
import { SyntaxHighlighter } from '@storybook/components';

import { EmptyBlock } from './EmptyBlock';

const StyledSyntaxHighlighter = styled(SyntaxHighlighter)(({ theme }) => ({
// DocBlocks-specific styling and overrides
fontSize: `${theme.typography.size.s2 - 1}px`,
lineHeight: '19px',
margin: '25px 0 40px',
borderRadius: theme.appBorderRadius,
boxShadow:
theme.base === 'light' ? 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' : 'rgba(0, 0, 0, 0.20) 0 2px 5px 0',
'pre.prismjs': {
padding: 20,
background: 'inherit',
},
}));
const StyledSyntaxHighlighter: typeof SyntaxHighlighter = styled(SyntaxHighlighter)(
({ theme }) => ({
// DocBlocks-specific styling and overrides
fontSize: `${theme.typography.size.s2 - 1}px`,
lineHeight: '19px',
margin: '25px 0 40px',
borderRadius: theme.appBorderRadius,
boxShadow:
theme.base === 'light'
? 'rgba(0, 0, 0, 0.10) 0 1px 3px 0'
: 'rgba(0, 0, 0, 0.20) 0 2px 5px 0',
'pre.prismjs': {
padding: 20,
background: 'inherit',
},
})
);

export enum SourceError {
NO_STORY = 'There\u2019s no story here.',
Expand Down

0 comments on commit 602a01a

Please sign in to comment.