From e6d7664bcc028e6266a9556e0df9ea3238847cbc Mon Sep 17 00:00:00 2001 From: Felix Beceic Date: Mon, 6 Mar 2023 09:57:59 +0100 Subject: [PATCH] #65 Add fallback to useLabel, improve naming --- libs/core/src/Pagination.tsx | 2 +- libs/form-elements/src/Field.tsx | 2 +- libs/form-elements/src/FieldGroup.tsx | 4 +-- libs/intl/src/IntlProvider.tsx | 4 +-- libs/intl/src/intlDictionary.js | 6 ++-- libs/intl/src/useIntlContext.tsx | 4 +-- libs/intl/src/useLabel.tsx | 4 +-- storybook/src/intl/Intl.mdx | 45 ++++++++++++++------------- 8 files changed, 37 insertions(+), 34 deletions(-) diff --git a/libs/core/src/Pagination.tsx b/libs/core/src/Pagination.tsx index 924a139..b036294 100644 --- a/libs/core/src/Pagination.tsx +++ b/libs/core/src/Pagination.tsx @@ -183,7 +183,7 @@ function PageSummary({ pageNumber, pageSize, totalElements, children, ...props }

{intl ? ( {{ diff --git a/libs/form-elements/src/Field.tsx b/libs/form-elements/src/Field.tsx index e4117d9..4da317f 100644 --- a/libs/form-elements/src/Field.tsx +++ b/libs/form-elements/src/Field.tsx @@ -144,7 +144,7 @@ export function FieldLabel({ id, label, required, tooltip, ...props }: FieldLabe const inputTokens = useTokens("Input", props.inputTokens); const fieldTokens = useTokens("Field", props.fieldTokens); - const requiredLabelText = useLabel("required"); + const requiredLabelText = useLabel("required", "Required field"); return (