diff --git a/app/frontend/src/components/FieldLabel/index.css.ts b/app/frontend/src/components/FieldLabel/index.css.ts index a828f84b0..50e9d89d7 100644 --- a/app/frontend/src/components/FieldLabel/index.css.ts +++ b/app/frontend/src/components/FieldLabel/index.css.ts @@ -1,11 +1,10 @@ import { style } from '@vanilla-extract/css'; -import { vars } from '@/styles'; -import { sansRegular12 } from '@/styles/font.css'; +import { vars, fontStyle } from '@/styles'; const { grayscaleBlack } = vars.color; export const label = style([ - sansRegular12, + fontStyle.sansRegular14, { color: grayscaleBlack, }, diff --git a/app/frontend/src/components/Input/Textarea.tsx b/app/frontend/src/components/Input/Textarea.tsx index af0d75393..4e78e663d 100644 --- a/app/frontend/src/components/Input/Textarea.tsx +++ b/app/frontend/src/components/Input/Textarea.tsx @@ -1,56 +1,41 @@ import * as styles from './Textarea.css'; import { FieldLabel } from '../FieldLabel'; -type TextareaProps = { +type TextareaProps = React.TextareaHTMLAttributes & { label?: string; - maxLength: number; - placeholder?: string; errorMessage?: string; - disabled?: boolean; - required?: boolean; fullWidth?: boolean; - rows?: number; - value?: string; - onChange?: React.ChangeEventHandler; - onKeyDown?: React.KeyboardEventHandler; }; export function Textarea({ - label, - placeholder = '', + label = '', errorMessage = '', - disabled = false, - maxLength, - required = false, fullWidth = false, - rows = 2, - value, - onChange, - onKeyDown, + ...rest }: TextareaProps) { + const { value, maxLength, disabled, required } = rest; + return (
{label && (
- - {value ? value.length : 0}/{maxLength} - + {maxLength && ( + + {value?.toString()?.length || 0}/{maxLength} + + )}
)}