How to use @css-modules-theme/react - 5 common examples

To help you get started, we’ve selected a few @css-modules-theme/react 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 ConfigurableUIComponents / configurable-interactive-layout / src / Layout / Layout.jsx View on Github external
render() {
    const { theme, themeProps } = this.props;
    const themingProperties = buildThemeProperties(theme, themeProps);
    const themeStyles = composeThemeFromProps(style, themingProperties, {
      compose: 'Merge',
    });

    let layouts;
    let cards = this.props.cardsConfiguration.cards;
    if(!cards) return null;

    let childrenWithKeys = null;

    if(this.props.layoutConfiguration.draggable){
      /* this is a layout where a user can move cards anywhere he wants */
      const cardIds = this.getCardIdsFromLayout(cards);
      childrenWithKeys = this.getChildrenWithKeys(cardIds);
      layouts = this.state.layouts;
    }
    else{
github ConfigurableUIComponents / configurable-interactive-layout / src / Card / CardActionItem.jsx View on Github external
render() {
    const { theme, themeProps } = this.props;
    const themingProperties = buildThemeProperties(theme, themeProps);
    const themeStyles = composeThemeFromProps(style, themingProperties, {
      compose: 'Merge',
    });
    const { onClickAction } = this;
    const actionIcon = this.getActionIconURL();
    // const divStyle = { background: `url('${actionIcon}') no-repeat center center` };
    const actionTooltip = (this.action.displayName) ? ` ${themeStyles.actionTooltip}` : null;
    return (
      <div role="button" tabindex="0" data-tooltip="{this.action.displayName}"> this.onMouseItem(true)}</div>
github ConfigurableUIComponents / configurable-interactive-layout / src / Card / Card.jsx View on Github external
render() {
    let showHeader = true;
    const {
      actions, title,
      configId,
      children,
      theme,
      themeProps,
      cardCssClass,
    } = this.props;
    const {
      isNewCard,
    } = this.state;

    const themingProperties = buildThemeProperties(theme, themeProps);
    const themeStyles = composeThemeFromProps(style, themingProperties, {
      compose: 'Merge',
    });

    let cardRef;
    let cardClassName = themeStyles.card;

    if (cardCssClass) {
      cardClassName += themeStyles[cardCssClass];
    }

    if (!title && !actions) {
      showHeader = false;
    } else if (title) {
      cardClassName += ` ${themeStyles.withTitle}`;
    }
github ConfigurableUIComponents / configurable-interactive-layout / src / Card / CardHeader.jsx View on Github external
render() {
    const {
      actions,
      title,
      theme,
      themeProps,
    } = this.props;

    const themingProperties = buildThemeProperties(theme, themeProps);
    const themeStyles = composeThemeFromProps(style, themingProperties, {
      compose: 'Merge',
    });

    return (
      <div>
        {actions ?  : null }
        {title ? <div><span title="{title}">{title}</span></div> : null }
      </div>
    );
  }
}
github ConfigurableUIComponents / configurable-interactive-layout / src / Card / CardActions.jsx View on Github external
render() {
    const { menuOpen } = this.state;
    const { theme, themeProps } = this.props;
    const themingProperties = buildThemeProperties(theme, themeProps);
    const themeStyles = composeThemeFromProps(style, themingProperties, {
      compose: 'Merge',
    });

    const actionItemsClassName = `${themeStyles.cardActionItems} ${menuOpen ? '' : themeStyles.dispnone}`;
    const actionsMenuClassName = `${themeStyles.cardsActionsMenu} ${menuOpen ? themeStyles.expanded : themeStyles.collapsed}`;
    const actionsClassName = `${themeStyles.actions} ${menuOpen ? themeStyles.menuOpen : ''}`;

    if (this.items.length &gt; 0) {
      return (
        <div>
          <div> this.onActionMenuClick()}
            onKeyUp={() =&gt; this.onActionMenuClick()}
            role="button"
            tabIndex={0}</div></div>

@css-modules-theme/react

Fast CSS Modules theming composition for react

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Popular @css-modules-theme/react functions