diff --git a/package.json b/package.json index ebf22e1..d8fb16c 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "coverage": "rc-test --coverage" }, "dependencies": { - "@rc-component/input": "~1.2.0", + "@rc-component/input": "~1.2.1", "@rc-component/resize-observer": "^1.0.0", "@rc-component/util": "^1.3.0", "clsx": "^2.1.1" diff --git a/src/TextArea.tsx b/src/TextArea.tsx index af2e233..5158dab 100644 --- a/src/TextArea.tsx +++ b/src/TextArea.tsx @@ -236,6 +236,7 @@ const TextArea = React.forwardRef( 'data-count': typeof dataCount === 'string' ? dataCount : undefined, }, }} + styles={styles} hidden={hidden} readOnly={readOnly} onClear={onClear} diff --git a/src/interface.ts b/src/interface.ts index 476d49a..bd62e32 100644 --- a/src/interface.ts +++ b/src/interface.ts @@ -31,7 +31,7 @@ export type TextAreaProps = Omit & { textarea?: string; count?: string; }; - styles?: { + styles?: CommonInputProps['styles'] & { textarea?: CSSProperties; count?: CSSProperties; }; diff --git a/tests/__snapshots__/index.spec.tsx.snap b/tests/__snapshots__/index.spec.tsx.snap index 2e02281..7a5a108 100644 --- a/tests/__snapshots__/index.spec.tsx.snap +++ b/tests/__snapshots__/index.spec.tsx.snap @@ -2,10 +2,38 @@ exports[`TextArea classNames and styles should work 1`] = `
- + + + suffix + + 3 + + + { const { container } = render( <>