From bed2f85d901eb7c6ec9b962fd2a4b8c50d193430 Mon Sep 17 00:00:00 2001 From: Johan Lindskogen Date: Mon, 27 Nov 2023 14:06:17 +0100 Subject: [PATCH] Danger button background, spacing and more! (#681) * Use snackskal as danger button background * Decrease spacing for button * Standardize clear filters button * Adjust RouteLeg for new design * Replace negative margin with border-radius --- .../ui/buttons/FlatButton.module.css | 2 +- .../ui/buttons/SecondaryButton.module.css | 2 +- .../ui/buttons/common/ButtonContent.tsx | 2 +- .../ui/route-leg/RouteLeg.stories.tsx | 80 +++++++++---------- .../src/components/ui/route-leg/RouteLeg.tsx | 15 ++-- .../features/chips/SearchFilterChips.tsx | 5 +- 6 files changed, 51 insertions(+), 55 deletions(-) diff --git a/packages/elements/src/components/ui/buttons/FlatButton.module.css b/packages/elements/src/components/ui/buttons/FlatButton.module.css index 5ea1bc8f1..c2e2ebb22 100644 --- a/packages/elements/src/components/ui/buttons/FlatButton.module.css +++ b/packages/elements/src/components/ui/buttons/FlatButton.module.css @@ -29,7 +29,7 @@ color: var(--lhds-color-red-500); &:hover { - background: var(--lhds-color-red-50); + background: var(--snackskal-light); } &:focus-visible { diff --git a/packages/elements/src/components/ui/buttons/SecondaryButton.module.css b/packages/elements/src/components/ui/buttons/SecondaryButton.module.css index 82671ccb1..d7cac2420 100644 --- a/packages/elements/src/components/ui/buttons/SecondaryButton.module.css +++ b/packages/elements/src/components/ui/buttons/SecondaryButton.module.css @@ -32,7 +32,7 @@ color: var(--lhds-color-red-600); &:hover { - background-color: var(--lhds-color-red-50); + background-color: var(--snackskal-light); border: 1px solid var(--lhds-color-red-400); } diff --git a/packages/elements/src/components/ui/buttons/common/ButtonContent.tsx b/packages/elements/src/components/ui/buttons/common/ButtonContent.tsx index bb73d5064..9e85fd2e6 100644 --- a/packages/elements/src/components/ui/buttons/common/ButtonContent.tsx +++ b/packages/elements/src/components/ui/buttons/common/ButtonContent.tsx @@ -108,7 +108,7 @@ export const ButtonContent: React.FC = ({ {label} )} - {label ? : null} + {label ? : null} {rightContent} ); diff --git a/packages/elements/src/components/ui/route-leg/RouteLeg.stories.tsx b/packages/elements/src/components/ui/route-leg/RouteLeg.stories.tsx index 0b895c299..dc0244e24 100644 --- a/packages/elements/src/components/ui/route-leg/RouteLeg.stories.tsx +++ b/packages/elements/src/components/ui/route-leg/RouteLeg.stories.tsx @@ -22,9 +22,9 @@ export const Demo = () => ( export const Overview = () => { return ( - + {routeLegSizes.map((size) => ( - + {size} ( ); export const Compact = () => ( - + ( ); export const CompactWithChildren = () => ( - + ( ); export const StandardWithStrikethrough = () => ( - - - + ); export const RelaxedWithStrikethrough = () => ( - - - + ); export const CompactWithStrikethrough = () => ( - + ( ); export const CompactWithLabel = () => ( - + ( ); export const CompactWithLabelSelected = () => ( - + ( ); export const RelaxedSelected = () => ( - + ( ); export const MultilegCompact = () => ( - + = ({ /> )}
- - + + + diff --git a/packages/filter/src/features/search-filter/features/chips/SearchFilterChips.tsx b/packages/filter/src/features/search-filter/features/chips/SearchFilterChips.tsx index f0d28bdf5..e8cdc5767 100644 --- a/packages/filter/src/features/search-filter/features/chips/SearchFilterChips.tsx +++ b/packages/filter/src/features/search-filter/features/chips/SearchFilterChips.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { ReactNode, useCallback } from "react"; import { Row } from "@stenajs-webui/core"; -import { FlatButton } from "@stenajs-webui/elements"; +import { FlatButton, stenaClean } from "@stenajs-webui/elements"; import { useSearchFilterDispatch } from "../../context/SearchFilterDispatchContext"; import { useSearchFilterActions } from "../../context/SearchFilterActionsContext"; @@ -28,7 +28,8 @@ export const SearchFilterChips: React.FC = ({ {!disableClearAllButton && ( )}