Skip to content

0.2.3

Pre-release
Pre-release

Choose a tag to compare

@namuol namuol released this 21 Sep 08:31

Initial pre-release version. 🍻

Features:

Custom :pseudo-selectors

<Combobox styles={{
  ':busy': { opacity: 0.5 },
}} />

Custom ::pseudo-elements

<Combobox styles={{
  '::indicator': { color: 'red' },
}} />

:chained::selectors

<Combobox styles={{
  ':busy::indicator': {
    animationName: 'spin',
    animationDuration: '500ms'
  },
}} />

Style callbacks

Compute style properties from the exposed style-state of your component.

import chroma from 'chroma-js';

const colorScale = chroma.scale([
  'white',
  'yellow',
  'red',
]).domain([
  0,
  5000,
  7000,
]);

<Tachometer styles={{
  color: ({rpm}) => { return colorScale(rpm).hex() }
}} />
<Dashboard styles={({rpm} => {
  return {
    '::tachometer': {
      color: colorScale(rpm).hex(),
    },
  };
})} />