From 1d1bba23140a7948b34a1cb9678802c71744b0f4 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sun, 24 May 2020 20:52:57 +0200 Subject: [PATCH] Export TextareaAutosizeProps type (#265) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: export Props type * Rename Props to TextareaAutosizeProps Co-authored-by: Mateusz BurzyƄski --- .changeset/spotty-hornets-wait.md | 5 +++++ src/index.tsx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/spotty-hornets-wait.md diff --git a/.changeset/spotty-hornets-wait.md b/.changeset/spotty-hornets-wait.md new file mode 100644 index 00000000..6da31239 --- /dev/null +++ b/.changeset/spotty-hornets-wait.md @@ -0,0 +1,5 @@ +--- +'react-textarea-autosize': patch +--- + +Exported `TextareaAutosizeProps` type for convenience. diff --git a/src/index.tsx b/src/index.tsx index 104adb51..956e12d6 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -11,7 +11,7 @@ type Style = Omit< height?: number; }; -type Props = JSX.IntrinsicElements['textarea'] & { +export type TextareaAutosizeProps = JSX.IntrinsicElements['textarea'] & { maxRows?: number; minRows?: number; onHeightChange?: (height: number) => void; @@ -21,7 +21,7 @@ type Props = JSX.IntrinsicElements['textarea'] & { const TextareaAutosize: React.ForwardRefRenderFunction< HTMLTextAreaElement, - Props + TextareaAutosizeProps > = ( { cacheMeasurements,