Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// No error
{}} />;
const ThemedButtonClassComponent = withTheme(ButtonClassComponent);
// $ExpectError - missing prop "onClick"
;
// No errors
{}} />;
// ===================================
// createTheming
// ===================================
createTheming('__MY_THEME__');
JssProvider,
SheetsRegistry
} from 'react-jss'
import preset from 'jss-preset-default'
import base from /* preval */ './base'
import uuid from '../utils/uuid'
const RAMBLER_UI_THEME = '__RAMBLER_UI_THEME__'
const RAMBLER_UI_JSS = '__RAMBLER_UI_JSS__'
const RAMBLER_UI_SHEETS_REGISTRY = '__RAMBLER_UI_SHEETS_REGISTRY__'
const RAMBLER_UI_THEME_COUNTER = '__RAMBLER_UI_THEME_COUNTER__'
const RAMBLER_UI_CLASS_NAME_PREFIX = '__RAMBLER_UI_CLASS_NAME_PREFIX__'
const ruiPrefix = 'rui-'
const theming = createTheming(RAMBLER_UI_THEME)
const {ThemeProvider, withTheme} = theming
export {withTheme}
export const createJss = (options = {}) =>
originalCreateJss({
...preset(options),
...options
})
export const createSheetsRegistry = () => new SheetsRegistry()
export const globalSheetsRegistry = createSheetsRegistry()
export const globalJss = createJss()
export const createGenerateClassName = (themeId = 0) => {
export const theme = {
colors: {
blue: '#315efb',
alternativeBlue: '#649dff',
dark: '#2b2c2d',
light: '#ffffff',
red: '#f85656',
black: '#262626',
carbone: '#343b4c',
cloudGray: '#8d96b2',
argentum: '#e5eaee',
argentumLight: '#eef2f4'
}
}
const theming = createTheming('UI_DOCS_THEME')
const {ThemeProvider: Provider, withTheme} = theming
export {withTheme}
export const ThemeProvider = ({children}) => (
{children}
)
export default styles => injectSheet(styles, {theming})