From 03740ffd27a89de3822e05beb6aa8aa170a643eb Mon Sep 17 00:00:00 2001 From: AssisrMatheus Date: Tue, 18 Apr 2023 15:04:02 -0400 Subject: [PATCH] feat: added jsx labels to text inputs --- CHANGELOG.md | 7 +++++++ package.json | 4 ++-- src/components/TextInput/TextAreaInput.tsx | 2 +- src/components/TextInput/TextInput.tsx | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba1752e..03ed2cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +## [10.2.0] 2023-04-18 + +### Changes + +- Added option to use JSX as label text of `TextInput` +- Added option to use JSX as label text of `TextAreaInput` + ## [10.1.0] 2023-04-17 ### Added diff --git a/package.json b/package.json index d7cb496..35d240d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@perimetre/ui", "description": "A component library made by @perimetre", - "version": "10.1.0", + "version": "10.2.0", "repository": { "type": "git", "url": "git+https://github.com/perimetre/ui.git" @@ -161,4 +161,4 @@ "resolutions": { "@storybook/react/webpack": "^5" } -} +} \ No newline at end of file diff --git a/src/components/TextInput/TextAreaInput.tsx b/src/components/TextInput/TextAreaInput.tsx index 67c43b0..0e33b50 100644 --- a/src/components/TextInput/TextAreaInput.tsx +++ b/src/components/TextInput/TextAreaInput.tsx @@ -12,7 +12,7 @@ export type TextAreaInputProps = React.DetailedHTMLProps< /** * If provided, displays a label above the input */ - label?: string; + label?: React.ReactNode; /** * If provided, displays a help text under the input */ diff --git a/src/components/TextInput/TextInput.tsx b/src/components/TextInput/TextInput.tsx index dec51ed..584f42f 100644 --- a/src/components/TextInput/TextInput.tsx +++ b/src/components/TextInput/TextInput.tsx @@ -9,7 +9,7 @@ export type TextInputProps = React.DetailedHTMLProps