1.0.6 • Published 4 months ago
@vuduc0801/react-native-atoms v1.0.6
Setup
- Add package
react-native-atoms
- Create file
atoms.config.js
- Export the configuration
type AtomsConfig {
outputDir: string
colors?: Record<string, string | string[]>
radiuses?: Record<string, number>
sizes?: Record<string, number>
shadows?: Record<string, ShadowProps>
strokes?: Record<string, number>
fontSizes?: Record<string, number>
fontWeights?: Record<string, string | number | undefined>
}
module.exports = defineAtomsConfig(AtomsConfig)
Generate
Run the following command to generate atom styles based on the configuration inside atoms.config.js
:
npx atoms generate
Note
- If you want to import TypeScript inside
atoms.config.js
(currently, we only support JavaScript for this config), placerequire('ts-node').register()
at the top ofatoms.config.js
.