@mw-kit/mw-ui
v1.8.22
Published
Made with create-react-library
Readme
@mw-kit/mw-ui
Assets (fonts)
This library expects fonts to be served by the host app. Copy the package fonts to a public folder and provide a base URL to the ThemeProvider. The copy command must be executed explicitly by the app.
Example:
- Run the copy command in your app (example):
{
"scripts": {
"prestart": "mw-ui-copy-fonts --dest public/mw-ui/fonts",
"prebuild": "mw-ui-copy-fonts --dest public/mw-ui/fonts"
}
}This copies from node_modules/@mw-kit/mw-ui/dist/assets/fonts to your public
folder. 2. Configure the ThemeProvider with the base URL:
import { ThemeProvider } from '@mw-kit/mw-ui'
export const App = () => (
<ThemeProvider assetBaseUrl='/assets/mw-ui'>{/* app */}</ThemeProvider>
)The library will resolve fonts from assetBaseUrl.
