UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

32 lines (31 loc) 830 B
const optionKeys = { left: "__oneStackToolbarLeft", right: "__oneStackToolbarRight", bottom: "__oneStackToolbarBottom" }; function appendStackToolbarConfig(options, props) { return { ...options, [optionKeys[props.placement ?? "bottom"]]: props }; } function exposeStackToolbarConfig(options) { const toolbar = { left: options[optionKeys.left], right: options[optionKeys.right], bottom: options[optionKeys.bottom] }; if (!toolbar.left && !toolbar.right && !toolbar.bottom) return options; const { [optionKeys.left]: _left, [optionKeys.right]: _right, [optionKeys.bottom]: _bottom, ...publicOptions } = options; return { ...publicOptions, toolbar }; } export { appendStackToolbarConfig, exposeStackToolbarConfig }; //# sourceMappingURL=StackToolbar.shared.mjs.map