From 4eb3ad46a1fadb3c5d9a62747dff9473e2841435 Mon Sep 17 00:00:00 2001 From: Michael Marszalek Date: Thu, 21 Sep 2023 08:01:07 +0200 Subject: [PATCH] =?UTF-8?q?feat(ErrorMessage):=20=E2=9C=A8=20Add=20`large`?= =?UTF-8?q?=20size=20(#840)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Typography/ErrorMessage/ErrorMessage.module.css | 7 +++++++ .../components/Typography/ErrorMessage/ErrorMessage.tsx | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/react/src/components/Typography/ErrorMessage/ErrorMessage.module.css b/packages/react/src/components/Typography/ErrorMessage/ErrorMessage.module.css index 831d41eb4e..1830300e98 100644 --- a/packages/react/src/components/Typography/ErrorMessage/ErrorMessage.module.css +++ b/packages/react/src/components/Typography/ErrorMessage/ErrorMessage.module.css @@ -13,6 +13,13 @@ margin-bottom: var(--fdsc-bottom-spacing); } +.errorMessage.large { + --fdsc-bottom-spacing: var(--fds-spacing-5); + + font: var(--fds-typography-error_message-large); + font-family: var(--fdsc-typography-font-family); +} + .errorMessage.medium { --fdsc-bottom-spacing: var(--fds-spacing-5); diff --git a/packages/react/src/components/Typography/ErrorMessage/ErrorMessage.tsx b/packages/react/src/components/Typography/ErrorMessage/ErrorMessage.tsx index ed0d9fbefb..bf62c32f91 100644 --- a/packages/react/src/components/Typography/ErrorMessage/ErrorMessage.tsx +++ b/packages/react/src/components/Typography/ErrorMessage/ErrorMessage.tsx @@ -8,7 +8,7 @@ import classes from './ErrorMessage.module.css'; export type ErrorMessageProps = { /** Changes text sizing */ - size?: 'xsmall' | 'small' | 'medium'; + size?: 'xsmall' | 'small' | 'medium' | 'large'; /** Adds margin-bottom */ spacing?: boolean; /** Toggle error color */