How to use emotion-theming - 10 common examples

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 gremlin / chaoskit / src / components / Container.js View on Github external
const Container = ({ className, size, ...opts }) => {
  const theme = useTheme();

  return (
github jaylineko / discohook / src / editor / Editor.tsx View on Github external
export default function Editor(props: Props) {
  const {
    message,
    onChange: handleChange,
    files,
    onFilesChange: handleFilesChange,
    onAppearanceChange: handleAppearanceChange,
    webhookUrl,
    onWebhookUrlChange: handleWebhookUrlChange,
    webhook,
  } = props

  const theme = useTheme()

  const [sending, setSending] = useState(false)
  const sendMessage = async () => {
    if (sending) return
    setSending(true)

    try {
      await executeWebhook(webhookUrl, message, files)
    } catch (error) {
      console.error("Error executing webhook:", error)
    }

    setSending(false)
  }

  const clearAll = () => {
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);

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