Skip to content

Releases: wayfair/rainbow-sprinkles

rainbow-sprinkles@0.10.0

21 May 20:34
Compare
Choose a tag to compare

Minor Changes

  • de5a718: - createRainbowSprinkles can now (and should) be created in a .css.js file

    • createRainbowSprinkles now creates the CSS and returns just the runtime function: rainbowSprinkles
    • rainbowSprinkles works similarly to getBoxProps, but now it returns a new property, otherProps, which are the props filtered through the function that are not rainbow sprinkles.

    The runtime function produced by createRainbowSprinkles is now serialized, meaning it can be exported from a .css.js file. (Attempting to do so previously would throw an error when being compiled by vanilla-extract.). Subsequently, this allowed a larger refactor to simplify the set-up API.

    Before:

    // rainbow-sprinkles.ts
    export const {
      getBoxProps,
      extractSprinklesFromProps,
      createRainbowSprinklesCss
    } = createRainbowSprinkles({ ... })

    After:

    // rainbow-sprinkles.css.ts
    export const rainbowSprinkles = createRainbowSprinkles({ ... })

    rainbowSprinkles functions similarly to getBoxProps, with the notable addition of otherProps:

    // App.tsx
    import { rainbowSprinkles } from './rainbow-sprinkles.css';
    
    const Box = props => {
      const { className, style, otherProps } = rainbowSprinkles(props);
    
      return <div className={className} style={style} {...otherProps} />;
    };

Patch Changes

  • b6931a1: Fixed processing of null or undefined prop values

rainbow-sprinkles@0.9.3

03 May 21:43
ed9796c
Compare
Choose a tag to compare

Patch Changes

  • e97903d: Add CSSVarFunction as a value type for dynamicProperties

rainbow-sprinkles@0.9.2

03 May 21:06
bfadf13
Compare
Choose a tag to compare

Patch Changes

  • 643499a: Add CSSVarFunction as value to dynamicProperties and staticProperties

rainbow-sprinkles@0.9.1

02 May 20:37
f16da4e
Compare
Choose a tag to compare

Patch Changes

  • b1a10d9: Move vanilla-extract dependencies to peer dependencies

rainbow-sprinkles@0.8.1

25 Apr 14:03
e285bf7
Compare
Choose a tag to compare

Patch Changes