UNPKG

react-code-blocks

Version:

Modified Atlaskit's Code Block to support more languages (i.e graphql, reasonml, etc) and theme (i.e railscast, dracula, monokai, etc) code snippets!

19 lines (17 loc) 392 B
import getTheme from './getTheme'; export default function themed(modesOrVariant: { light: string; dark: string; }) { var modes = modesOrVariant; return function( props: | import('../types').CustomThemeProps | import('../types').NoThemeProps | undefined ) { var theme = getTheme(props); let themeMode = theme.mode; return modes[themeMode]; }; }