Releases: wayfair/rainbow-sprinkles
Releases · wayfair/rainbow-sprinkles
[email protected]
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]
Patch Changes
- 357ff4b: Fix latest tag
[email protected]
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
[email protected]
Patch Changes
- e97903d: Add CSSVarFunction as a value type for dynamicProperties
[email protected]
Patch Changes
- 643499a: Add CSSVarFunction as value to dynamicProperties and staticProperties
[email protected]
Patch Changes
- b1a10d9: Move vanilla-extract dependencies to peer dependencies
[email protected]
Patch Changes
- ce2f0ce: Update readme