From d51f5157652ae45198fb7c6c2f3325e97f3d7c55 Mon Sep 17 00:00:00 2001 From: Heather Yu <35639529+hetd54@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:41:39 -0400 Subject: [PATCH 1/3] feat: add text counter for textarea --- src/components/Textarea.tsx | 44 +++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/src/components/Textarea.tsx b/src/components/Textarea.tsx index 1b7dedd..f419440 100644 --- a/src/components/Textarea.tsx +++ b/src/components/Textarea.tsx @@ -1,4 +1,4 @@ -import React from "react" +import React, { useState } from "react" import * as Form from "@radix-ui/react-form" interface TextareaProps extends React.TextareaHTMLAttributes { @@ -7,20 +7,30 @@ interface TextareaProps extends React.TextareaHTMLAttributes( - ({ name, label, ...delegated }, ref) => ( - - {label} - -