vega-frontend-monorepo/libs/ui-toolkit/src/components/text-area/text-area.tsx
Matthew Russell ff8990c257
Fix/411 asset dropdown style (#535)
* fix: arrow missing from select box

* fix: select box styles on firefox
2022-06-10 16:12:51 -07:00

20 lines
641 B
TypeScript

import classNames from 'classnames';
import type { TextareaHTMLAttributes } from 'react';
import { forwardRef } from 'react';
import { defaultFormElement } from '../../utils/shared';
export interface TextAreaProps
extends TextareaHTMLAttributes<HTMLTextAreaElement> {
hasError?: boolean;
className?: string;
}
export const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(
({ className, hasError, ...props }, ref) => {
const classes = classNames(defaultFormElement, className, {
'border-vega-pink dark:border-vega-pink': hasError,
});
return <textarea {...props} ref={ref} className={classes} />;
}
);