From 715264b967c0811cde77f29ec7e98312d780cd45 Mon Sep 17 00:00:00 2001 From: Gethin Webster Date: Mon, 7 Aug 2023 09:14:30 +0200 Subject: [PATCH] feat: Update primary link styling and usage (#1405) --- pages/cards/hooks.page.tsx | 6 +- pages/cards/permutations.page.tsx | 3 +- pages/help-panel/permutations.page.tsx | 4 +- .../__snapshots__/themes.test.ts.snap | 40 +- .../__snapshots__/design-tokens.test.ts.snap | 20 +- .../__snapshots__/documenter.test.ts.snap | 10 +- src/alert/internal.tsx | 55 +-- src/breadcrumb-group/item/styles.scss | 2 +- src/cards/index.tsx | 111 ++--- src/help-panel/index.tsx | 5 +- .../context/link-default-variant-context.ts | 8 + src/internal/styles/links.scss | 2 + src/link/constants.scss | 13 +- src/link/index.tsx | 6 +- src/link/interfaces.ts | 7 + src/link/internal.tsx | 5 +- src/popover/internal.tsx | 21 +- src/table/internal.tsx | 421 +++++++++--------- .../congratulation-screen.tsx | 2 +- .../components/tutorial-list/index.tsx | 1 + src/wizard/wizard-navigation.tsx | 1 + style-dictionary/classic/colors.ts | 3 +- style-dictionary/classic/typography.ts | 3 - style-dictionary/utils/token-names.ts | 4 - style-dictionary/visual-refresh/colors.ts | 1 - style-dictionary/visual-refresh/typography.ts | 3 - 26 files changed, 382 insertions(+), 375 deletions(-) create mode 100644 src/internal/context/link-default-variant-context.ts diff --git a/pages/cards/hooks.page.tsx b/pages/cards/hooks.page.tsx index f1bbe30a87..fcde6ac35b 100644 --- a/pages/cards/hooks.page.tsx +++ b/pages/cards/hooks.page.tsx @@ -14,7 +14,11 @@ import { EmptyState, getMatchesCountText, paginationLabels, pageSizeOptions } fr import ScreenshotArea from '../utils/screenshot-area'; export const cardDefinition: CardsProps.CardDefinition = { - header: item => {item.id}, + header: item => ( + + {item.id} + + ), sections: [ { id: 'type', diff --git a/pages/cards/permutations.page.tsx b/pages/cards/permutations.page.tsx index 0548481561..417f1e64bb 100644 --- a/pages/cards/permutations.page.tsx +++ b/pages/cards/permutations.page.tsx @@ -9,6 +9,7 @@ import Cards, { CardsProps } from '~components/cards/index'; import createPermutations from '../utils/permutations'; import PermutationsView from '../utils/permutations-view'; import ScreenshotArea from '../utils/screenshot-area'; +import { Link } from '~components'; interface Item { number: number; @@ -27,7 +28,7 @@ function createSimpleItems(count: number) { } const cardDefinition: CardsProps.CardDefinition = { - header: item => item.text, + header: item => (item.number === 2 ? {item.text} : item.text), sections: [ { id: 'description', diff --git a/pages/help-panel/permutations.page.tsx b/pages/help-panel/permutations.page.tsx index da065a84e7..cbe03dd361 100644 --- a/pages/help-panel/permutations.page.tsx +++ b/pages/help-panel/permutations.page.tsx @@ -6,6 +6,7 @@ import Box from '~components/box'; import Icon from '~components/icon'; import ScreenshotArea from '../utils/screenshot-area'; import styles from './styles.scss'; +import { Link } from '~components'; const mainContent = (
@@ -97,7 +98,8 @@ const mainContent = (