Yoga exposes a function that let you create your very own theme which can later be injected into <ThemeProvider>
.
You can refer to Theme in order to see our theme object schema.
There is also a CodeSandbox project containing a minimal demo of all this concept in action as a practical reference. Feel free to report any issues, suggestions or even submiting pull requests in our repository.
This is a simple usage:
import styled from 'styled-components';import { createTheme, ThemeProvider, Button } from '@gympass/yoga';const theme = createTheme((tokens) => ({colors: {primary: tokens.colors.deepPurple,}}));<ThemeProvider theme={theme}><Button>Hey! I'm themed!</Button></ThemeProvider>