·
61 commits
to main
since this release
Minor Changes
-
#76
7dd1ec8
Thanks @lilnasy! - Breaking: The required@stylexjs/stylex
version is now 0.5.1.Updates
@stylexjs/stylex
version to 0.5.1. This version introduces a new API for non-react UI frameworks:stylex.attrs()
.Previously, svelte users had to create a wrapper function around
stylex.props()
, which returned theclassName
prop intended only for React. The newly introducedstylex.attrs()
returns the generated classes in theclass
props, allowing it to work across frameworks.<script context="module"> import stylex from "@stylexjs/stylex" const colorStyles = stylex.create({ red: { backgroundColor: 'red', borderColor: 'darkred', }, green: { backgroundColor: 'lightgreen', borderColor: 'darkgreen', }, }); </script> <button {...stylex.attrs(colorStyles.red)} /> <button {...stylex.attrs(colorStyles.green)} />