Style
/ API Reference / PluginsStyle
/ API Reference / PluginsfallbackValue
This plugin adds fallbacks to the style object.
The Gist
import { fallbackValuePlugin } from '@weser/style'
const plugin = fallbackValuePlugin([
{
property: ['width', 'height'],
fallback: (value) => {
if (value === 'min-content') {
return ['-webkit-min-content', 'min-content']
}
},
},
])
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| fallbacks | Array<T_Fallback> | [] | An array of fallbacks to apply to the style. |
Returns
(Plugin) A plugin function that can be passed to the createRenderer function.
© 2024-present Robin Weser. All Rights Reserved.