From 9b10d1615618080421f9d4670104d50940ff8960 Mon Sep 17 00:00:00 2001 From: GuillaumeKESTEMAN Date: Mon, 20 Jan 2025 16:20:42 +0100 Subject: [PATCH] fix(alert): stop to set font-weight of ghost button to 400 in alert --- client/look-and-feel/css/src/Alert/Alert.scss | 12 ++++++------ .../css/src/Alert/Alert.stories.ts | 5 +++-- client/look-and-feel/react/src/Alert/Alert.tsx | 18 +++++++++--------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/client/look-and-feel/css/src/Alert/Alert.scss b/client/look-and-feel/css/src/Alert/Alert.scss index 8e9e2dc7d..4a61b363d 100644 --- a/client/look-and-feel/css/src/Alert/Alert.scss +++ b/client/look-and-feel/css/src/Alert/Alert.scss @@ -1,3 +1,5 @@ +@use "../common/common.scss" as common; + .af-alert { display: flex; padding: 1rem; @@ -80,6 +82,9 @@ .af-alert-client__content { width: 100%; + font-size: common.rem(18); + font-weight: 400; + line-height: common.rem(22.5); .af-alert__action { display: flex; @@ -88,15 +93,10 @@ } .af-alert__title { + margin: 0; padding-bottom: 0.25rem; font-weight: 600; line-height: 1.5rem; } } - - * { - margin: 0; - font-size: 1.125rem; - font-weight: 400; - } } diff --git a/client/look-and-feel/css/src/Alert/Alert.stories.ts b/client/look-and-feel/css/src/Alert/Alert.stories.ts index 333b910a1..26be8aebe 100644 --- a/client/look-and-feel/css/src/Alert/Alert.stories.ts +++ b/client/look-and-feel/css/src/Alert/Alert.stories.ts @@ -1,4 +1,5 @@ import type { Args, Meta, StoryObj } from "@storybook/html"; +import "../Button/Button.scss"; import "../Link/Link.scss"; import "./Alert.scss"; @@ -84,7 +85,7 @@ export const Default: StoryObj = { title: "My Alert title", type: "information", children: `Vestibulum nunc neque, sodales non luctus in, dictum vitae nisl. Curabitur vitae massa non nisl lacinia tempus. Pellentesque id nulla tortor. -

Plus de détails

+
Plus de détails
`, }, }; @@ -96,7 +97,7 @@ export const WithButtonAction: StoryObj = { title: "My Alert title", type: "information", children: `Vestibulum nunc neque, sodales non luctus in, dictum vitae nisl. Curabitur vitae massa non nisl lacinia tempus. Pellentesque id nulla tortor. -

+
`, }, }; diff --git a/client/look-and-feel/react/src/Alert/Alert.tsx b/client/look-and-feel/react/src/Alert/Alert.tsx index bce3e8082..bf631ca40 100644 --- a/client/look-and-feel/react/src/Alert/Alert.tsx +++ b/client/look-and-feel/react/src/Alert/Alert.tsx @@ -1,18 +1,18 @@ +import "@axa-fr/design-system-look-and-feel-css/dist/Alert/Alert.scss"; +import checkCircleOutline from "@material-symbols/svg-400/outlined/check_circle.svg"; +import errorIcon from "@material-symbols/svg-400/outlined/emergency_home.svg"; +import errorOutline from "@material-symbols/svg-400/outlined/error.svg"; +import infoIcon from "@material-symbols/svg-400/outlined/info.svg"; +import wbIncandescentOutlined from "@material-symbols/svg-400/outlined/wb_incandescent.svg"; import { ComponentPropsWithoutRef, PropsWithChildren, ReactElement, useMemo, } from "react"; -import wbIncandescentOutlined from "@material-symbols/svg-400/outlined/wb_incandescent.svg"; -import infoIcon from "@material-symbols/svg-400/outlined/info.svg"; -import errorIcon from "@material-symbols/svg-400/outlined/emergency_home.svg"; -import errorOutline from "@material-symbols/svg-400/outlined/error.svg"; -import checkCircleOutline from "@material-symbols/svg-400/outlined/check_circle.svg"; -import "@axa-fr/design-system-look-and-feel-css/dist/Alert/Alert.scss"; -import { Svg } from "../Svg"; -import { Link } from "../Link/Link"; import { ButtonClient } from "../Button/Button"; +import { Link } from "../Link/Link"; +import { Svg } from "../Svg"; type Headings = "h2" | "h3" | "h4" | "h5" | "h6"; @@ -65,7 +65,7 @@ export const Alert = ({
{title && {title}} {children} - {action &&

{action}

} + {action &&
{action}
}
);