UNPKG

@base-ui-components/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

14 lines 363 B
export function resolvePromiseOptions(options, result) { if (typeof options === 'string') { return { description: options }; } if (typeof options === 'function') { const resolvedOptions = options(result); return typeof resolvedOptions === 'string' ? { description: resolvedOptions } : resolvedOptions; } return options; }