UNPKG

@scrolia/react

Version:

A headless scrollbar component

17 lines (15 loc) 403 B
/** The function to get component props with plugins. */ const getComponentProps = (options) => { const { name, props, plugins } = options; let result = props; for (const plugin of plugins) { if (!plugin.props?.[name]) continue; result = { ...result, ...plugin.props[name](result) }; } return result; }; exports.getComponentProps = getComponentProps; //# sourceMappingURL=props.js.map