Skip to content

Commit

Permalink
feat(textarea): modify the clear button icon
Browse files Browse the repository at this point in the history
  • Loading branch information
IsDyh01 committed Nov 5, 2024
1 parent a4c2310 commit c2b16d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/components/input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18",
"@nextui-org/theme": ">=2.3.0",
"@nextui-org/theme": ">=2.2.12",
"@nextui-org/system": ">=2.0.0"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/input/src/textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {forwardRef} from "@nextui-org/system";
import {mergeProps} from "@react-aria/utils";
import {useMemo, useState} from "react";
import TextareaAutosize from "react-textarea-autosize";
import {TrashIcon} from "@nextui-org/shared-icons";
import {CloseFilledIcon} from "@nextui-org/shared-icons";

import {UseInputProps, useInput} from "./use-input";

Expand Down Expand Up @@ -123,7 +123,7 @@ const Textarea = forwardRef<"textarea", TextAreaProps>(
);

const clearButtonContent = useMemo(() => {
return isClearable ? <button {...getClearButtonProps()}>{<TrashIcon />}</button> : null;
return isClearable ? <button {...getClearButtonProps()}>{<CloseFilledIcon />}</button> : null;
}, [isClearable, getClearButtonProps]);

const innerWrapper = useMemo(() => {
Expand Down

0 comments on commit c2b16d4

Please sign in to comment.