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.

16 lines (15 loc) 420 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveStyle = resolveStyle; /** * If the provided style is an object, it will be returned as is. * Otherwise, the function will call the style function with the state as the first argument. * * @param style * @param state */ function resolveStyle(style, state) { return typeof style === 'function' ? style(state) : style; }