UNPKG

@yamada-ui/radio

Version:

Yamada UI radio component

56 lines (54 loc) 1.51 kB
"use client" import { useRadioCardContext } from "./chunk-ZLJHOIFP.mjs"; // src/radio-card-label.tsx import { forwardRef } from "@yamada-ui/core"; import { ui } from "@yamada-ui/core"; import { cx } from "@yamada-ui/utils"; import { jsx, jsxs } from "react/jsx-runtime"; var RadioCardLabel = forwardRef( ({ className, children, withIcon, contentProps, iconProps, ...rest }, ref) => { const { styles, withIcon: defaultWithIcon, getIconProps, iconProps: defaultIconProps } = useRadioCardContext(); withIcon != null ? withIcon : withIcon = defaultWithIcon; return /* @__PURE__ */ jsxs( ui.div, { ref, className: cx("ui-radio-card__label", className), __css: { ...styles.label }, ...rest, children: [ /* @__PURE__ */ jsx( ui.span, { className: "ui-radio-card__label-content", __css: { ...styles.labelContent }, ...contentProps, children } ), withIcon ? /* @__PURE__ */ jsx( ui.div, { className: "ui-radio-card__icon", __css: { ...styles.icon }, ...getIconProps({ ...defaultIconProps, ...iconProps }) } ) : null ] } ); } ); RadioCardLabel.displayName = "RadioCardLabel"; RadioCardLabel.__ui__ = "RadioCardLabel"; export { RadioCardLabel }; //# sourceMappingURL=chunk-Q5GTUIUF.mjs.map