UNPKG

hoda-react

Version:

<div align="center"> <h1>:construction: flowbite-react (unreleased) :construction:</h1> <p> <a href="https://flowbite-react.com"> <img alt="Flowbite - Tailwind CSS components" width="350" src=".github/assets/flowbite-react-github.png"> <

11 lines (10 loc) 717 B
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; import classNames from 'classnames'; import { forwardRef } from 'react'; import { useTheme } from '../Flowbite/ThemeContext'; import { HelperText } from '../HelperText'; export const Textarea = forwardRef(({ shadow, helperText, color = 'gray', className, ...props }, ref) => { const theme = useTheme().theme.textarea; return (_jsxs(_Fragment, { children: [_jsx("textarea", { ref: ref, className: classNames(theme.base, theme.colors[color], theme.withShadow[shadow ? 'on' : 'off'], className), ...props }), helperText && _jsx(HelperText, { color: color, children: helperText })] })); }); Textarea.displayName = 'Textarea';