@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.
16 lines (15 loc) • 459 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.resolveClassName = resolveClassName;
/**
* If the provided className is a string, it will be returned as is.
* Otherwise, the function will call the className function with the state as the first argument.
*
* @param className
* @param state
*/
function resolveClassName(className, state) {
return typeof className === 'function' ? className(state) : className;
}
;