@ark-ui/react
Version:
A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.
20 lines (16 loc) • 476 B
JavaScript
'use client';
;
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const createSplitProps = () => (props, keys) => keys.reduce(
(previousValue, currentValue) => {
const [target, source] = previousValue;
const key = currentValue;
if (source[key] !== void 0) {
target[key] = source[key];
}
delete source[key];
return [target, source];
},
[{}, { ...props }]
);
exports.createSplitProps = createSplitProps;