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!
10 lines (7 loc) • 377 B
text/typescript
import { ThemeProps, ModeSafeTheme } from 'types';
const DEFAULT_THEME_MODE = 'light';
// Resolves the different types of theme objects in the current API
export default function getTheme(props?: ThemeProps): ModeSafeTheme {
// If format not supported (or no theme provided), return standard theme
return { mode: DEFAULT_THEME_MODE, ...props?.theme } as ModeSafeTheme;
}