SpiroKit for React Native 1.0.1 released

SpiroKit for React Native 1.0.1 released

This new version includes IntelliSense improvements for the useTheme and useColorModeValue hooks.

Resources

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 image.png

  • fontSizes image.png

  • letterSpacings image.png

  • lineHeights image.png

  • fontWeights image.png

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: image.png

More about this hook here: docs.spirokit.com/?path=/docs/getting-start..

I hope you enjoy these few quality-of-life improvements.

Happy coding!