UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

61 lines (60 loc) 1.61 kB
"use client"; const require_use_props = require("../../core/MantineProvider/use-props/use-props.cjs"); const require_extract_style_props = require("../../core/Box/style-props/extract-style-props/extract-style-props.cjs"); //#region packages/@mantine/core/src/components/Input/use-input-props.ts function useInputProps(component, defaultProps, _props) { const props = require_use_props.useProps(component, defaultProps, _props); const { label, description, error, required, classNames, styles, className, unstyled, __staticSelector, __stylesApiProps, errorProps, labelProps, descriptionProps, wrapperProps: _wrapperProps, id, size, style, inputContainer, inputWrapperOrder, withAsterisk, variant, vars, mod, attributes, ...others } = props; const { styleProps, rest } = require_extract_style_props.extractStyleProps(others); const wrapperProps = { label, description, error, required, classNames, className, __staticSelector, __stylesApiProps: __stylesApiProps || props, errorProps, labelProps, descriptionProps, unstyled, styles, size, style, inputContainer, inputWrapperOrder, withAsterisk, variant, id, mod, attributes, ..._wrapperProps }; return { ...rest, classNames, styles, unstyled, wrapperProps: { ...wrapperProps, ...styleProps }, inputProps: { required, classNames, styles, unstyled, size, __staticSelector, __stylesApiProps: __stylesApiProps || props, error, variant, id, attributes } }; } //#endregion exports.useInputProps = useInputProps; //# sourceMappingURL=use-input-props.cjs.map