How to use the react-with-styles/lib/ThemedStyleSheet.registerDefaultTheme function in react-with-styles

To help you get started, we’ve selected a few react-with-styles examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github williaster / data-ui / packages / demo / themes / withStyles.js View on Github external
import PropTypes from 'prop-types';
import ThemedStyleSheet from 'react-with-styles/lib/ThemedStyleSheet';
import aphroditeInterface from 'react-with-styles-interface-aphrodite';
import { css, withStyles, ThemeProvider } from 'react-with-styles';

import DefaultTheme from './DefaultTheme';

ThemedStyleSheet.registerDefaultTheme(DefaultTheme);
ThemedStyleSheet.registerInterface(aphroditeInterface);

const withStylesPropTypes = {
  styles: PropTypes.object.isRequired,
  theme: PropTypes.object.isRequired,
};

export { css, ThemedStyleSheet, ThemeProvider, withStyles, withStylesPropTypes };

react-with-styles

[![Build Status][travis-svg]][travis-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url]

MIT
Latest version published 3 years ago

Package Health Score

59 / 100
Full package analysis