How to use the emotion-theming.withTheme function in emotion-theming

To help you get started, we’ve selected a few emotion-theming 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 sumup-oss / circuit-ui / src / components / SideNav / components / Drawer / Drawer.js View on Github external
shadow: 'single',
  open: false,
  transitionDuration: {
    enter: transitions.duration.enteringScreen,
    exit: transitions.duration.leavingScreen
  },
  variant: 'temporary', // Mobile first.
  SlideProps: {},
  CardProps: {},
  ModalProps: { open: false },
  onClose: () => {},
  children: null,
  className: null
};

export default withTheme(Drawer);
github storybookjs / storybook / addons / actions / src / components / ActionLogger / index.js View on Github external
import PropTypes from 'prop-types';
import React from 'react';
import Inspector from 'react-inspector';
import { withTheme } from 'emotion-theming';

import { ActionBar, ActionButton } from '@storybook/components';

import { Actions, Action, Wrapper, InspectorContainer, Countwrap, Counter } from './style';

const ActionLogger = withTheme(({ actions, onClear, theme }) => (
  
    
      {actions.map(action => (
        
          {action.count > 1 && {action.count}}
          
            
          
        
      ))}
github mineral-ui / mineral-ui / src / library / themes / themed.tsx View on Github external
const outTheme = isThemeFn(theme) ? theme(props, context) : theme;
    const { theme: ignore, ...outProps } = props;

    return (
      
        
      
    );
  };

  Wrapper.propTypes = WrappedComponent.propTypes;
  Wrapper.displayName = wrapDisplayName(WrappedComponent, 'Themed');

  hoistNonReactStatics(Wrapper, WrappedComponent);

  return withTheme(Wrapper);
};
github GoogleChromeLabs / progressive-tooling / src / components / hero / hero.component.js View on Github external
theme,
  backgroundColor = theme.backgroundPrimary
}) => (
  
    
      
      Progressive Tooling
    
    
      A list of community-built, third-party tools that can be used to improve
      page performance
    
  
);

export const Hero = withTheme(HeroComponent);
github gillkyle / sol-journal / src / components / Icon.js View on Github external
{name === "Sun" && }
    {name === "User" && }
    {label && labelRight && (
      <span style="{{">
        {label}
      </span>
    )}
  
)

export default withTheme(Icon)
github staylor / graphql-wordpress / packages / draft / src / routes / Admin / NavMenu / SubNav / index.js View on Github external
{item.routes.map(route =&gt; (
        
          {route.label}
        
      ))}
    
  );
}

export default withTheme(SubNav);
github storybookjs / storybook / lib / ui / src / modules / ui / components / shortcuts_help.js View on Github external
);
}

ShortcutsHelp.propTypes = {
  theme: PropTypes.shape({}).isRequired,
  isOpen: PropTypes.bool,
  onClose: PropTypes.func,
  platform: PropTypes.string.isRequired,
};
ShortcutsHelp.defaultProps = {
  isOpen: false,
  onClose: () =&gt; {},
};

export default withTheme(ShortcutsHelp);
github nib-edit / Nib / packages / ui / src / components / Select / index.js View on Github external
value={selectedOption}
    {...rest}
  />
);

Select.propTypes = {
  selectedOption: PropTypes.shape({
    label: PropTypes.string,
    value: PropTypes.object
  }).isRequired,
  theme: PropTypes.shape({
    select: PropTypes.object
  }).isRequired
};

export default withTheme(Select);

emotion-theming

A CSS-in-JS theming solution, inspired by styled-components

MIT
Latest version published 4 years ago

Package Health Score

80 / 100
Full package analysis

Similar packages