UNPKG

@ozen-ui/kit

Version:

React component library

18 lines (17 loc) 923 B
import { __assign, __rest } from "tslib"; import './FormTitle.css'; import React from 'react'; import { useThemeProps } from '../../hooks/useThemeProps'; import { cn } from '../../utils/classname'; import { polymorphicComponentWithRef, } from '../../utils/polymorphicComponentWithRef'; import { FORM_TITLE_DEFAULT_SIZE } from './constants'; export var cnFormTitle = cn('FormTitle'); export var FormTitle = polymorphicComponentWithRef(function (inProps, ref) { var props = useThemeProps({ props: inProps, name: 'FormTitle', }); var _a = props.size, size = _a === void 0 ? FORM_TITLE_DEFAULT_SIZE : _a, className = props.className, children = props.children, other = __rest(props, ["size", "className", "children"]); return (React.createElement("div", __assign({ className: cnFormTitle({ size: size }, [className]) }, other, { ref: ref }), children)); }); FormTitle.displayName = 'FormTitle';