UNPKG

@clayui/form

Version:
102 lines (101 loc) 2.74 kB
import ClayIcon from "@clayui/icon"; import classNames from "classnames"; import React from "react"; const BlockquoteText = React.forwardRef(({ children, className, ...otherProps }, ref) => /* @__PURE__ */ React.createElement( "div", { ...otherProps, className: classNames("blockquote form-text", className), ref }, children )); BlockquoteText.displayName = "ClayFormBlockquoteText"; const Group = React.forwardRef( ({ children, className, small, ...otherProps }, ref) => /* @__PURE__ */ React.createElement( "div", { ...otherProps, className: classNames( "form-group", { "form-group-sm": small }, className ), ref }, children ) ); Group.displayName = "ClayFormGroup"; const HelpText = React.forwardRef(({ children, className, ...otherProps }, ref) => /* @__PURE__ */ React.createElement( "span", { ...otherProps, className: classNames("form-help-text", className), ref }, children )); HelpText.displayName = "ClayFormHelpText"; const Text = React.forwardRef(({ children, className, ...otherProps }, ref) => /* @__PURE__ */ React.createElement( "div", { ...otherProps, className: classNames("form-text", className), ref }, children )); Text.displayName = "ClayFormText"; const FeedbackGroup = React.forwardRef(({ children, className, ...otherProps }, ref) => /* @__PURE__ */ React.createElement( "div", { ...otherProps, className: classNames("form-feedback-group", className), ref }, children )); FeedbackGroup.displayName = "ClayFormFeedbackGroup"; const FeedbackItem = React.forwardRef(({ children, className, ...otherProps }, ref) => /* @__PURE__ */ React.createElement( "div", { ...otherProps, className: classNames("form-feedback-item", className), ref }, children )); FeedbackItem.displayName = "ClayFormFeedbackItem"; const FeedbackIndicator = React.forwardRef( ({ className, spritemap, symbol, ...otherProps }, ref) => /* @__PURE__ */ React.createElement( "span", { ...otherProps, className: classNames( "form-feedback-indicator", "inline-item-before", className ), ref }, /* @__PURE__ */ React.createElement(ClayIcon, { spritemap, symbol }) ) ); FeedbackIndicator.displayName = "ClayFormFeedbackIndicator"; const ClayForm = React.forwardRef(({ children, ...otherProps }, ref) => /* @__PURE__ */ React.createElement("form", { ...otherProps, ref }, children)); ClayForm.displayName = "ClayForm"; var Form_default = Object.assign(ClayForm, { BlockquoteText, FeedbackGroup, FeedbackIndicator, FeedbackItem, Group, HelpText, Text }); export { Form_default as default };