Plumeria

cx

merge function of the classNames

Return value

Filters undefined and false and returns a string.

TypeScript
import { css, cx } from '@plumeria/core';
 
const styles = css.create({
  one: {
    display: 'flex',
    justifyContent: 'space-between',
  },
  two: {
    fontSize: '14px',
    color: '#606060',
  },
});
 
const style = cx(styles.one, styles.two);

Argument expression

Good to know

Since falsy values are filtered out, you can use logical and, ternary operators, etc. in argument expressions.

More

On this page