How to use bpk-component-theme-toggle - 2 common examples

To help you get started, we’ve selected a few bpk-component-theme-toggle 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 Skyscanner / backpack / packages / bpk-docs / src / layouts / DefaultLayout / DefaultLayout.js View on Github external
* limitations under the License.
 */

import Helmet from 'react-helmet';
import PropTypes from 'prop-types';
import React from 'react';
import { updateOnThemeChange } from 'bpk-component-theme-toggle';
import BpkThemeProvider from 'bpk-theming';
import { cssModules } from 'bpk-react-utils';

import themeAttributes from '../../themeableAttributes';
import Footer from '../../components/Footer';

import STYLES from './default-layout.scss';

const EnhancedThemeProvider = updateOnThemeChange(BpkThemeProvider);
const getClassName = cssModules(STYLES);

const DefaultLayout = props => {
  const { children } = props;

  return (
    
      <div id="pagewrap">
        
        <main>{children}</main>
        <footer>
      </footer></div>
github Skyscanner / backpack / packages / bpk-theming / stories.js View on Github external
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import React from 'react';
import { storiesOf } from '@storybook/react';

import { updateOnThemeChange } from 'bpk-component-theme-toggle';

import BpkThemeProvider from './index';
import BpkThemeableText, {
  themeAttributes as buttonThemeAttributes,
} from './bpk-themeable-text/BpkThemeableText';

const EnhancedThemeProvider = updateOnThemeChange(BpkThemeProvider);

const BpkThemePicker = () =&gt; (
  
    Hello world
  
);

storiesOf('bpk-theming', module)
  .add('Default', () =&gt; (
    
  ));

bpk-component-theme-toggle

Backpack theme toggle component.

Apache-2.0
Latest version published 2 years ago

Package Health Score

70 / 100
Full package analysis

Popular bpk-component-theme-toggle functions

Similar packages