How to use the glamor.compose function in glamor

To help you get started, we’ve selected a few glamor 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 pluralsight / design-system / packages / tag / src / react / index.js View on Github external
tag: (themeName, { href, icon, isPressed, onClick, size }) => {
    const label = 'psds-tag'
    const clickable = href || onClick

    return compose(
      css(stylesheet[`.${label}`]),
      css(stylesheet[`.${label}.psds-theme--${themeName}`]),
      clickable && css(stylesheet[`.${label}--clickable`]),
      clickable &&
        css(stylesheet[`.${label}--clickable.psds-theme--${themeName}`]),
      css(stylesheet[`.${label}--size-${size}`]),
      icon && css(stylesheet[`.${label}--icon`]),
      isPressed && css(stylesheet[`.${label}--isPressed`])
    )
  },
  label: (themeName, { icon }) => {

glamor

inline css for component systems

MIT
Latest version published 7 years ago

Package Health Score

59 / 100
Full package analysis

Popular glamor functions