How to use clsx - 10 common examples

To help you get started, we’ve selected a few clsx 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 ififfy / flipflip / src / renderer / components / configGroups / ImageVideoCard.tsx View on Github external
type: 'number',
                }}/>
            
          
          
            
              
                }
                label="Start at Random Time"/>
            
          
          
            
              
                }
                label="Continue Videos"/>
github mui-org / material-ui / packages / material-ui / src / FormControlLabel / FormControlLabel.js View on Github external
<label>
      {React.cloneElement(control, controlProps)}
      
        {label}
      
    </label>
  );
});
github ififfy / flipflip / src / renderer / components / sceneDetail / SceneDetail.tsx View on Github external
Are you sure you want to remove all sources from this scene?
                
              
              
                <button color="secondary">
                  Cancel
                </button>
                <button color="primary">
                  OK
                </button>
              
            
            
              
                
github bvaughn / react-virtualized / source / Grid / Grid.example.js View on Github external
let content;

    switch (columnIndex) {
      case 1:
        content = datum.name;
        break;
      case 2:
        content = datum.random;
        break;
      default:
        content = `r:${rowIndex}, c:${columnIndex}`;
        break;
    }

    const classNames = clsx(rowClass, styles.cell, {
      [styles.centeredCell]: columnIndex &gt; 2,
    });

    return (
      <div style="{style}">
        {content}
      </div>
    );
  }
github GoogleChrome / lighthouse-ci / packages / server / src / ui / layout / page-header.jsx View on Github external
<div>
        {props.childrenLeft ? (
          props.childrenLeft
        ) : (
          <div role="button"> props.setIsSidebarOpen(true)}
          &gt;
            <i>menu</i>
          </div>
        )}
      </div>
      <div>{props.children}</div>
      <div>
        {props.childrenRight}
      </div>
    
  );
};
github oam-dev / kubevela / docs / index.js View on Github external
<div>
          <div>
            <img alt="Kubevela Logo" src="{useBaseUrl('img/logo.svg')}">
          </div>
          <h2>{siteConfig.title}</h2>
          
            Star
         
          <p>{siteConfig.tagline}</p>
          <div>
            <button href="{useBaseUrl('docs/quick-start')}">Get Started</button>
            <button href="{useBaseUrl('docs/')}">Learn More</button>
          </div>
        </div>
      

      

      <main>
        <div>
          <section>
            <div>
              {features.map((f, idx) =&gt; (
                
              ))}
            </div></section></div></main>
github mui-org / material-ui / packages / material-ui-lab / src / Rating / Rating.js View on Github external
const item = (propsItem, state) =&gt; {
    const id = `${name}-${String(propsItem.value).replace('.', '-')}`;
    const container = (
      
        {emptyIcon &amp;&amp; !state.filled ? emptyIcon : icon}
      
    );

    if (readOnly || disabled) {
      return {container};
    }

    return (

clsx

A tiny (239B) utility for constructing className strings conditionally.

MIT
Latest version published 7 months ago

Package Health Score

81 / 100
Full package analysis

Popular clsx functions