# All files / components/BandwidthThemeProvider BandwidthThemeProvider.js

75% Statements 3/4
100% Branches 0/0
0% Functions 0/1
75% Lines 3/4

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20

    4x

    4x

    4x

     import React from 'react';
    import PropTypes from 'prop-types';
    import { withProps } from 'recompose';
    import { ThemeProvider } from 'styled-components';
    import irisTheme, { catapult as catapultTheme, NAMESPACE } from '../../theme';

    const BandwidthThemeProvider = ({ children, theme }) => (
      <ThemeProvider theme={{ [NAMESPACE]: theme }}>{children}</ThemeProvider>
    );

    BandwidthThemeProvider.defaultProps = {
      theme: irisTheme,
    };

    BandwidthThemeProvider.CatapultThemeProvider = withProps({
      theme: catapultTheme,
    })(BandwidthThemeProvider);

    export default BandwidthThemeProvider;