Releases: wayfair/rainbow-sprinkles
Releases · wayfair/rainbow-sprinkles
rainbow-sprinkles@0.10.0
Minor Changes
-
de5a718: -
createRainbowSprinkles
can now (and should) be created in a.css.js
filecreateRainbowSprinkles
now creates the CSS and returns just the runtime function:rainbowSprinkles
rainbowSprinkles
works similarly togetBoxProps
, 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 togetBoxProps
, with the notable addition ofotherProps
:// 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
Patch Changes
- e97903d: Add CSSVarFunction as a value type for dynamicProperties
rainbow-sprinkles@0.9.2
Patch Changes
- 643499a: Add CSSVarFunction as value to dynamicProperties and staticProperties
rainbow-sprinkles@0.9.1
Patch Changes
- b1a10d9: Move vanilla-extract dependencies to peer dependencies
rainbow-sprinkles@0.8.1
Patch Changes
- ce2f0ce: Update readme