Skip to content

Releases: wayfair/rainbow-sprinkles

[email protected]

23 May 15:54
383bbc5
Compare
Choose a tag to compare

Patch Changes

  • 4d0158a: - Prevents scale values that do not have a `# rainbow-sprinkles prefix from evaluating to scale values.
    • Fixes the case where a configured CSS property had a defined scale for staticProperties, and allowed arbitrary values through dynamicProperties, and the incorrect classes were being generated

[email protected]

21 May 20:44
fd1c9d8
Compare
Choose a tag to compare

Patch Changes

[email protected]

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

[email protected]

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

Patch Changes

  • e97903d: Add CSSVarFunction as a value type for dynamicProperties

[email protected]

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

Patch Changes

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

[email protected]

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

Patch Changes

  • b1a10d9: Move vanilla-extract dependencies to peer dependencies

[email protected]

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

Patch Changes