This new version includes IntelliSense improvements for the useTheme
and useColorModeValue
hooks.
Resources
- If you are interested in getting your SpiroKit license, please visit our website
- Want to learn more about SpiroKit before buying? Visit our public documentation site
useTheme
improvements
useTheme
is a custom hook inherited from NativeBase that allows you to access the theme object from the global context. This is useful when you need to get the value for a SpiroKit token like primary.500
or emerald.700
.
This hook was already available with SpiroKit 1.0.0, but I made a slight improvement so you can get IntelliSense for the following tokens:
colors
fontSizes
letterSpacings
lineHeights
fontWeights
More about this hook here: docs.spirokit.com/?path=/docs/getting-start..
useColorModeValue
improvements
useColorModeValue
is another custom hook inherited from NativeBase that can retrieve a value from parameters passed based on the active color mode (light/dark). SpiroKit also adds a third optional parameter that allows you to override the global color mode for a specific scenario.
This hook was already available with SpiroKit 1.0.0, but now you will get IntelliSense both for "light" and "dark" parameters:
More about this hook here: docs.spirokit.com/?path=/docs/getting-start..
I hope you enjoy these few quality-of-life improvements.
Happy coding!