The ThemeProvider is an essential component that applies styling and theming to all Natura Design System components. It must wrap your application or the portion of your app using natds-react components.
A CSS prefix to be added to dynamic class names generation. This option isolates generated class names and is useful for micro frontend architectures.Important: To avoid conflicts with multiple style fonts, it is recommended to always provide a unique cssPrefix.
Load brand-specific fonts by adding this to your index.html:
<!-- For Natura --><link href="https://cdn.jsdelivr.net/npm/@naturacosmeticos/natds-themes@latest/dist/assets/natura_fonts.css" rel="stylesheet" /><!-- For Avon --><link href="https://cdn.jsdelivr.net/npm/@naturacosmeticos/natds-themes@latest/dist/assets/avon_fonts.css" rel="stylesheet" /><!-- For The Body Shop --><link href="https://cdn.jsdelivr.net/npm/@naturacosmeticos/natds-themes@latest/dist/assets/theBodyShop_fonts.css" rel="stylesheet" /><!-- For Aesop --><link href="https://cdn.jsdelivr.net/npm/@naturacosmeticos/natds-themes@latest/dist/assets/aesop_fonts.css" rel="stylesheet" />
import { Theme } from '@naturacosmeticos/natds-themes'interface ThemeProviderProps { /** * The application */ children: React.ReactNode /** * Theme to be used */ theme: Theme /** * A css prefix to be added in the dynamic class names generation. * This option is used to isolate the generated class names and * it is useful if you are developing a micro frontend */ cssPrefix?: string}