uikit-react-public 0.17.4 → 0.21.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -4
- package/dist/components/Accordion/Accordion.Heading.d.ts +1 -0
- package/dist/components/AppHeader/AppHeader.d.ts +1 -1
- package/dist/components/AppHeader/AppHeaderBottom.d.ts +1 -1
- package/dist/components/AppHeader/AppHeaderNav.d.ts +1 -1
- package/dist/components/AppHeader/AppHeaderTop.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumb.d.ts +3 -4
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +7 -3
- package/dist/components/Button/Button.stories.d.ts +17 -7
- package/dist/components/Button/style/buttonAccentStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonPrimaryDestructiveStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonPrimaryStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonPrimarySubtleStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonPrimaryWarningStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonSecondaryDestructiveStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonSecondaryStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonSecondarySubtleStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonTertiaryDestructiveStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonTertiaryNoPaddingStyle.d.ts +4 -0
- package/dist/components/Button/style/buttonTertiaryStyle.d.ts +4 -0
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/FooterNew/BackToTop.d.ts +8 -0
- package/dist/components/FooterNew/Footer.d.ts +23 -0
- package/dist/components/FooterNew/FooterColumn.d.ts +8 -0
- package/dist/components/FooterNew/FooterLinks.d.ts +7 -0
- package/dist/components/FooterNew/FooterNavLink.d.ts +8 -0
- package/dist/components/FooterNew/LegalAndCopyright.d.ts +14 -0
- package/dist/components/FooterNew/LogoAddressAndSocial.d.ts +10 -0
- package/dist/components/FooterNew/SocialLink.d.ts +8 -0
- package/dist/components/FooterNew/__tests__/Footer.test.d.ts +1 -0
- package/dist/components/FooterNew/index.d.ts +2 -0
- package/dist/components/HeaderNew/Header.d.ts +18 -0
- package/dist/components/HeaderNew/HeaderBorder.d.ts +7 -0
- package/dist/components/HeaderNew/HeaderLogo.d.ts +9 -0
- package/dist/components/HeaderNew/HeaderMenuContainer.d.ts +7 -0
- package/dist/components/HeaderNew/HeaderTitle.d.ts +9 -0
- package/dist/components/HeaderNew/__tests__/Header.test.d.ts +1 -0
- package/dist/components/HeaderNew/constants.d.ts +3 -0
- package/dist/components/HeaderNew/index.d.ts +3 -0
- package/dist/components/Heading/Heading.d.ts +6 -4
- package/dist/components/Heading/Heading.stories.d.ts +8 -6
- package/dist/components/Icon/svgImports.d.ts +7 -881
- package/dist/components/Link/BaseLink.d.ts +14 -5
- package/dist/components/Link/Link.d.ts +8 -3
- package/dist/components/Link/Link.stories.d.ts +3 -1
- package/dist/components/MenuNew/Menu.context.d.ts +14 -0
- package/dist/components/MenuNew/Menu.d.ts +20 -0
- package/dist/components/MenuNew/MenuContent.d.ts +9 -0
- package/dist/components/MenuNew/MenuItem.d.ts +10 -0
- package/dist/components/MenuNew/MenuSection.d.ts +7 -0
- package/dist/components/MenuNew/index.d.ts +6 -0
- package/dist/components/MenuNew/trigger/ButtonMenuTrigger.d.ts +8 -0
- package/dist/components/MenuNew/trigger/IconMenuTrigger.d.ts +8 -0
- package/dist/components/Overlay/Overlay.stories.d.ts +12 -12
- package/dist/components/Paragraph/Paragraph.d.ts +5 -2
- package/dist/components/Paragraph/Paragraph.stories.d.ts +6 -3
- package/dist/components/Select/Select.d.ts +2 -1
- package/dist/components/Select/Select.stories.d.ts +13 -1
- package/dist/components/Select/Select.types.d.ts +40 -13
- package/dist/components/Select/subcomponents/CustomSelect.d.ts +3 -3
- package/dist/components/Select/subcomponents/FilterInput.d.ts +3 -1
- package/dist/components/Select/subcomponents/NativeSelect.d.ts +2 -2
- package/dist/components/Select/subcomponents/VisibleField.d.ts +4 -1
- package/dist/components/Spinner/Spinner.d.ts +2 -0
- package/dist/components/StandaloneLink/StandaloneLink.d.ts +8 -5
- package/dist/components/StandaloneLink/StandaloneLink.stories.d.ts +3 -1
- package/dist/components/Table/Table.d.ts +3 -3
- package/dist/components/Table/Table.stories.d.ts +3 -3
- package/dist/components/Table/Table.types.d.ts +1 -0
- package/dist/components/Table/subcomponents/Cell/Cell.d.ts +5 -1
- package/dist/components/Table/subcomponents/Cell/Cell.stories.d.ts +15 -13
- package/dist/components/Table/subcomponents/Cell/CellContent.d.ts +5 -1
- package/dist/components/Table/subcomponents/HeadCell/HeadCell.d.ts +2 -1
- package/dist/components/Table/subcomponents/HeadCell/HeadCell.stories.d.ts +14 -13
- package/dist/components/Table/subcomponents/HeadCell/HeadCellContent.d.ts +2 -1
- package/dist/components/Table/subcomponents/__tests__/Row.test.d.ts +1 -0
- package/dist/components/UclLogoNew/UclLogo.d.ts +8 -0
- package/dist/components/UclLogoNew/index.d.ts +2 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/index.js +20104 -15317
- package/dist/theme/__tests__/fonts.test.d.ts +1 -0
- package/dist/theme/common/themeCommon.d.ts +904 -0
- package/dist/theme/fonts.d.ts +18 -0
- package/dist/theme/index.d.ts +6 -3
- package/dist/theme/light/lightColour.d.ts +126 -0
- package/dist/theme/light/lightTheme.d.ts +3 -0
- package/dist/theme/original/color.d.ts +166 -0
- package/dist/theme/original/defaultTheme.d.ts +1340 -0
- package/dist/theme/original/originalColourNewStructure.d.ts +126 -0
- package/dist/theme/useTheme.d.ts +2174 -0
- package/dist/utils/addAlphaToHex.d.ts +5 -0
- package/dist/utils/scrollToTop.d.ts +2 -0
- package/lib/components/Accordion/Accordion.Heading.tsx +51 -39
- package/lib/components/Accordion/Accordion.Panel.tsx +0 -4
- package/lib/components/Accordion/Accordion.tsx +34 -28
- package/lib/components/Accordion/__tests__/__snapshots__/Accordion.test.tsx.snap +12 -10
- package/lib/components/Alert/Alert.tsx +12 -12
- package/lib/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +13 -39
- package/lib/components/AppHeader/AppHeader.tsx +6 -11
- package/lib/components/AppHeader/AppHeaderBottom.tsx +2 -3
- package/lib/components/AppHeader/AppHeaderNav.tsx +2 -3
- package/lib/components/AppHeader/AppHeaderTop.tsx +1 -1
- package/lib/components/AppHeader/__tests__/__snapshots__/AppHeader.test.tsx.snap +2 -2
- package/lib/components/AppMenu/__tests__/__snapshots__/AppMenu.test.tsx.snap +6 -19
- package/lib/components/Badge/Badge.stories.tsx +1 -1
- package/lib/components/Breadcrumbs/Breadcrumb.tsx +26 -12
- package/lib/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/lib/components/Breadcrumbs/__tests__/Breadcrumbs.test.tsx +9 -27
- package/lib/components/Breadcrumbs/__tests__/__snapshots__/Breadcrumbs.test.tsx.snap +24 -20
- package/lib/components/Button/Button.mdx +32 -279
- package/lib/components/Button/Button.stories.tsx +43 -50
- package/lib/components/Button/Button.tsx +165 -25
- package/lib/components/Button/__tests__/Button.test.tsx +49 -15
- package/lib/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +80 -73
- package/lib/components/Button/style/buttonAccentStyle.ts +53 -0
- package/lib/components/Button/style/buttonPrimaryDestructiveStyle.ts +55 -0
- package/lib/components/Button/style/buttonPrimaryStyle.ts +53 -0
- package/lib/components/Button/style/buttonPrimarySubtleStyle.ts +64 -0
- package/lib/components/Button/style/buttonPrimaryWarningStyle.ts +56 -0
- package/lib/components/Button/style/buttonSecondaryDestructiveStyle.ts +63 -0
- package/lib/components/Button/style/buttonSecondaryStyle.ts +62 -0
- package/lib/components/Button/style/buttonSecondarySubtleStyle.ts +72 -0
- package/lib/components/Button/style/buttonTertiaryDestructiveStyle.ts +65 -0
- package/lib/components/Button/style/buttonTertiaryNoPaddingStyle.ts +52 -0
- package/lib/components/Button/style/buttonTertiaryStyle.ts +62 -0
- package/lib/components/Calendar/Calendar.stories.tsx +33 -13
- package/lib/components/Calendar/Calendar.tsx +2 -2
- package/lib/components/Calendar/__tests__/__snapshots__/Calendar.test.tsx.snap +99 -95
- package/lib/components/Calendar/subcomponents/AcademicWeek.tsx +2 -1
- package/lib/components/Calendar/subcomponents/AcademicWeeks.tsx +2 -3
- package/lib/components/Calendar/subcomponents/ColumnHeading.tsx +3 -7
- package/lib/components/Calendar/subcomponents/Controls.tsx +1 -1
- package/lib/components/Calendar/subcomponents/Day.stories.tsx +1 -1
- package/lib/components/Calendar/subcomponents/Day.tsx +7 -9
- package/lib/components/Calendar/subcomponents/EventDot.tsx +4 -8
- package/lib/components/Checkbox/Checkbox.stories.tsx +1 -1
- package/lib/components/Checkbox/Checkbox.tsx +12 -10
- package/lib/components/Checkbox/__tests__/Checkbox.test.tsx +29 -0
- package/lib/components/Checkbox/__tests__/__snapshots__/Checkbox.test.tsx.snap +4 -4
- package/lib/components/Datepicker/__tests__/Datepicker.test.tsx +117 -0
- package/lib/components/Datepicker/__tests__/__snapshots__/Datepicker.test.tsx.snap +16 -44
- package/lib/components/Datepicker/subcomponents/CustomDatepicker.tsx +10 -1
- package/lib/components/Datepicker/subcomponents/VisibleField.tsx +24 -23
- package/lib/components/Dialog/BaseDialog.tsx +2 -2
- package/lib/components/Dialog/Dialog.stories.tsx +1 -1
- package/lib/components/Divider/__tests__/__snapshots__/Breadcrumbs.test.tsx.snap +12 -12
- package/lib/components/FeedbackDialog/FeedbackDialog.stories.tsx +1 -1
- package/lib/components/FeedbackDialog/FeedbackDialog.tsx +4 -6
- package/lib/components/Field/CharacterCount.tsx +2 -2
- package/lib/components/Field/ErrorText.tsx +1 -1
- package/lib/components/Field/Field.tsx +1 -1
- package/lib/components/Field/HelperText.tsx +3 -1
- package/lib/components/FileInput/FileInput.stories.tsx +1 -1
- package/lib/components/FileInput/__tests__/__snapshots__/FileInput.test.tsx.snap +4 -20
- package/lib/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +70 -79
- package/lib/components/FooterNew/BackToTop.tsx +83 -0
- package/lib/components/FooterNew/Footer.tsx +110 -0
- package/lib/components/FooterNew/FooterColumn.tsx +79 -0
- package/lib/components/FooterNew/FooterLinks.tsx +44 -0
- package/lib/components/FooterNew/FooterNavLink.tsx +63 -0
- package/lib/components/FooterNew/LegalAndCopyright.tsx +150 -0
- package/lib/components/FooterNew/LogoAddressAndSocial.tsx +154 -0
- package/lib/components/FooterNew/SocialLink.tsx +108 -0
- package/lib/components/FooterNew/__tests__/Footer.test.tsx +51 -0
- package/lib/components/FooterNew/__tests__/__snapshots__/Footer.test.tsx.snap +1107 -0
- package/lib/components/FooterNew/index.ts +2 -0
- package/lib/components/HeaderDraft/__tests__/__snapshots__/Header.test.tsx.snap +3 -2
- package/lib/components/HeaderNew/Header.tsx +93 -0
- package/lib/components/HeaderNew/HeaderBorder.tsx +55 -0
- package/lib/components/HeaderNew/HeaderLogo.tsx +70 -0
- package/lib/components/HeaderNew/HeaderMenuContainer.tsx +35 -0
- package/lib/components/HeaderNew/HeaderTitle.tsx +53 -0
- package/lib/components/HeaderNew/__tests__/Header.test.tsx +42 -0
- package/lib/components/HeaderNew/__tests__/__snapshots__/Header.test.tsx.snap +79 -0
- package/lib/components/HeaderNew/constants.ts +3 -0
- package/lib/components/HeaderNew/index.ts +7 -0
- package/lib/components/Heading/Heading.stories.tsx +34 -41
- package/lib/components/Heading/Heading.tsx +180 -49
- package/lib/components/Heading/__tests__/__snapshots__/Heading.test.tsx.snap +4 -4
- package/lib/components/Icon/__tests__/__snapshots__/Icon.test.tsx.snap +16 -12
- package/lib/components/Icon/svgImports.ts +318 -296
- package/lib/components/IconButton/IconButton.tsx +3 -4
- package/lib/components/IconButton/__tests__/__snapshots__/IconButton.test.tsx.snap +12 -9
- package/lib/components/Link/BaseLink.tsx +114 -71
- package/lib/components/Link/Link.stories.tsx +1 -1
- package/lib/components/Link/Link.tsx +120 -109
- package/lib/components/Link/__tests__/__snapshots__/link.test.tsx.snap +2 -2
- package/lib/components/MenuNew/Menu.context.tsx +149 -0
- package/lib/components/MenuNew/Menu.tsx +75 -0
- package/lib/components/MenuNew/MenuContent.tsx +140 -0
- package/lib/components/MenuNew/MenuItem.tsx +101 -0
- package/lib/components/MenuNew/MenuSection.tsx +47 -0
- package/lib/components/MenuNew/index.ts +8 -0
- package/lib/components/MenuNew/trigger/ButtonMenuTrigger.tsx +42 -0
- package/lib/components/MenuNew/trigger/IconMenuTrigger.tsx +40 -0
- package/lib/components/Pagination/Pagination.stories.tsx +1 -1
- package/lib/components/Pagination/PaginationControls.tsx +4 -5
- package/lib/components/Pagination/PaginationInfo.tsx +2 -3
- package/lib/components/Paragraph/Paragraph.stories.tsx +29 -27
- package/lib/components/Paragraph/Paragraph.tsx +212 -81
- package/lib/components/Paragraph/__tests__/__snapshots__/Paragraph.test.tsx.snap +5 -5
- package/lib/components/Radio/Radio.stories.tsx +1 -1
- package/lib/components/Radio/Radio.tsx +8 -8
- package/lib/components/Radio/__tests__/__snapshots__/Radio.test.tsx.snap +4 -4
- package/lib/components/Search/__tests__/__snapshots__/Search.test.tsx.snap +12 -32
- package/lib/components/Select/Select.mdx +23 -0
- package/lib/components/Select/Select.stories.tsx +43 -10
- package/lib/components/Select/Select.tsx +14 -3
- package/lib/components/Select/Select.types.ts +53 -16
- package/lib/components/Select/__tests__/Select.test.tsx +250 -1
- package/lib/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +5 -4
- package/lib/components/Select/subcomponents/CustomOption.tsx +10 -3
- package/lib/components/Select/subcomponents/CustomSelect.tsx +110 -10
- package/lib/components/Select/subcomponents/FilterInput.tsx +13 -3
- package/lib/components/Select/subcomponents/NativeSelect.tsx +10 -18
- package/lib/components/Select/subcomponents/Panel.tsx +2 -2
- package/lib/components/Select/subcomponents/VisibleField.tsx +48 -3
- package/lib/components/Snackbar/__tests__/__snapshots__/Snackbar.test.tsx.snap +9 -15
- package/lib/components/Spinner/Spinner.tsx +24 -5
- package/lib/components/Spinner/__tests__/Spinner.test.tsx +35 -5
- package/lib/components/Spinner/__tests__/__snapshots__/Spinner.test.tsx.snap +40 -16
- package/lib/components/StandaloneLink/StandaloneLink.stories.tsx +1 -1
- package/lib/components/StandaloneLink/StandaloneLink.tsx +180 -163
- package/lib/components/StandaloneLink/__tests__/__snapshots__/StandaloneLink.test.tsx.snap +2 -2
- package/lib/components/Table/Table.stories.tsx +1 -1
- package/lib/components/Table/Table.tsx +2 -0
- package/lib/components/Table/Table.types.ts +1 -0
- package/lib/components/Table/__tests__/Table.test.tsx +19 -0
- package/lib/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +7 -3
- package/lib/components/Table/subcomponents/Cell/Cell.stories.tsx +1 -1
- package/lib/components/Table/subcomponents/Cell/Cell.tsx +23 -2
- package/lib/components/Table/subcomponents/Cell/CellContent.tsx +12 -1
- package/lib/components/Table/subcomponents/Cell/__tests__/Cell.test.tsx +106 -0
- package/lib/components/Table/subcomponents/Cell/__tests__/__snapshots__/Cell.test.tsx.snap +4 -3
- package/lib/components/Table/subcomponents/HeadCell/HeadCell.stories.tsx +1 -1
- package/lib/components/Table/subcomponents/HeadCell/HeadCell.tsx +28 -6
- package/lib/components/Table/subcomponents/HeadCell/HeadCellContent.tsx +3 -0
- package/lib/components/Table/subcomponents/HeadCell/__tests__/HeadCell.test.tsx +221 -2
- package/lib/components/Table/subcomponents/HeadCell/__tests__/__snapshots__/HeadCell.test.tsx.snap +6 -4
- package/lib/components/Table/subcomponents/Row.tsx +2 -2
- package/lib/components/Table/subcomponents/SortIcon.tsx +1 -0
- package/lib/components/Table/subcomponents/__tests__/Row.test.tsx +59 -0
- package/lib/components/Tabs/Tab.tsx +3 -3
- package/lib/components/Tabs/Tabs.stories.tsx +1 -1
- package/lib/components/Tabs/Tabs.tsx +5 -3
- package/lib/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +4 -4
- package/lib/components/Timepicker/Timepicker.stories.tsx +1 -1
- package/lib/components/Toggle/Toggle.tsx +5 -5
- package/lib/components/Toggle/ToggleHandle.tsx +2 -3
- package/lib/components/Tooltip/Tooltip.tsx +2 -2
- package/lib/components/Tooltip/__tests__/__snapshots__/tooltip.test.tsx.snap +2 -2
- package/lib/components/UclLogoNew/UclLogo.tsx +42 -0
- package/lib/components/UclLogoNew/index.ts +2 -0
- package/lib/components/WeekPicker/WeekPicker.stories.tsx +3 -5
- package/lib/components/common/Common.mdx +0 -1
- package/lib/components/index.ts +19 -1
- package/lib/theme/Colours.mdx +1 -1
- package/lib/theme/Theme.mdx +1 -1
- package/lib/theme/Typography.mdx +1 -1
- package/lib/theme/__tests__/fonts.test.ts +37 -0
- package/lib/theme/common/themeCommon.ts +515 -0
- package/lib/theme/fonts.ts +110 -0
- package/lib/theme/index.ts +6 -6
- package/lib/theme/light/lightColour.ts +232 -0
- package/lib/theme/light/lightTheme.ts +37 -0
- package/lib/theme/{defaultTheme.ts → original/color.ts} +17 -199
- package/lib/theme/original/defaultTheme.ts +207 -0
- package/lib/theme/original/originalColourNewStructure.ts +185 -0
- package/lib/theme/useTheme.tsx +72 -15
- package/lib/types/assets.d.ts +10 -0
- package/lib/utils/addAlphaToHex.ts +29 -0
- package/lib/utils/scrollToTop.ts +5 -0
- package/package.json +11 -6
- package/dist/components/Button/buttonPrimaryStyle.d.ts +0 -4
- package/dist/components/Button/buttonSecondaryStyle.d.ts +0 -4
- package/dist/components/Button/buttonTertiaryStyle.d.ts +0 -4
- package/dist/theme/defaultTheme.d.ts +0 -274
- package/lib/components/Button/buttonPrimaryStyle.ts +0 -62
- package/lib/components/Button/buttonSecondaryStyle.ts +0 -65
- package/lib/components/Button/buttonTertiaryStyle.ts +0 -54
|
@@ -72,6 +72,7 @@ exports[`Header > snapshot: variant=avatar 1`] = `
|
|
|
72
72
|
class="ucl-uikit-icon css-10o3g4f"
|
|
73
73
|
data-testid="ucl-uikit-icon"
|
|
74
74
|
fill="none"
|
|
75
|
+
focusable="false"
|
|
75
76
|
height="24"
|
|
76
77
|
stroke="currentColor"
|
|
77
78
|
stroke-linecap="round"
|
|
@@ -81,8 +82,8 @@ exports[`Header > snapshot: variant=avatar 1`] = `
|
|
|
81
82
|
width="24"
|
|
82
83
|
xmlns="http://www.w3.org/2000/svg"
|
|
83
84
|
>
|
|
84
|
-
<
|
|
85
|
-
|
|
85
|
+
<path
|
|
86
|
+
d="m6 9 6 6 6-6"
|
|
86
87
|
/>
|
|
87
88
|
</svg>
|
|
88
89
|
</div>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { memo, HTMLAttributes } from 'react';
|
|
2
|
+
import { css, cx } from '@emotion/css';
|
|
3
|
+
import { useTheme } from '../..';
|
|
4
|
+
import HeaderMenuContainer from './HeaderMenuContainer';
|
|
5
|
+
import HeaderTitle from './HeaderTitle';
|
|
6
|
+
import HeaderLogo from './HeaderLogo';
|
|
7
|
+
import HeaderBorder from './HeaderBorder';
|
|
8
|
+
import { HEADER_MOBILE_HEIGHT_PX, HEADER_TABLET_HEIGHT_PX } from './constants';
|
|
9
|
+
|
|
10
|
+
export const NAME = 'ucl-uikit-header';
|
|
11
|
+
|
|
12
|
+
export interface HeaderProps extends HTMLAttributes<HTMLElement> {
|
|
13
|
+
title: string;
|
|
14
|
+
titleAs?: React.ElementType<React.HTMLAttributes<HTMLElement>>;
|
|
15
|
+
titleClassName?: string;
|
|
16
|
+
titleProps?: Record<string, unknown>;
|
|
17
|
+
homeLinkHref?: string;
|
|
18
|
+
homeLinkProps?: Record<string, unknown>;
|
|
19
|
+
testId?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const Header = ({
|
|
23
|
+
title,
|
|
24
|
+
titleAs = 'div',
|
|
25
|
+
titleClassName,
|
|
26
|
+
titleProps,
|
|
27
|
+
homeLinkHref,
|
|
28
|
+
homeLinkProps,
|
|
29
|
+
testId = NAME,
|
|
30
|
+
className,
|
|
31
|
+
children,
|
|
32
|
+
...props
|
|
33
|
+
}: HeaderProps) => {
|
|
34
|
+
const [theme] = useTheme();
|
|
35
|
+
|
|
36
|
+
const baseStyle = css`
|
|
37
|
+
position: relative;
|
|
38
|
+
background-color: ${theme.colour.surface.primary};
|
|
39
|
+
font-family: ${theme.font.family.primary};
|
|
40
|
+
font-synthesis: none;
|
|
41
|
+
text-rendering: optimizeLegibility;
|
|
42
|
+
-webkit-font-smoothing: antialiased;
|
|
43
|
+
-moz-osx-font-smoothing: grayscale;
|
|
44
|
+
color: ${theme.color.text.inverted};
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
height: ${HEADER_MOBILE_HEIGHT_PX}px;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
padding: 0 ${theme.padding.p16} 0 ${theme.padding.p40};
|
|
50
|
+
border-bottom: ${theme.colour.border.subtle};
|
|
51
|
+
|
|
52
|
+
@media (min-width: ${theme.breakpoints.desktop}px) {
|
|
53
|
+
height: ${HEADER_TABLET_HEIGHT_PX}px;
|
|
54
|
+
padding: 0 ${theme.padding.p64};
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
|
|
58
|
+
const style = cx(NAME, baseStyle, className);
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<header
|
|
62
|
+
className={style}
|
|
63
|
+
data-testid={testId}
|
|
64
|
+
{...props}
|
|
65
|
+
>
|
|
66
|
+
<HeaderBorder />
|
|
67
|
+
<HeaderLogo
|
|
68
|
+
linkHref={homeLinkHref}
|
|
69
|
+
linkProps={homeLinkProps}
|
|
70
|
+
/>
|
|
71
|
+
<HeaderTitle
|
|
72
|
+
className={titleClassName}
|
|
73
|
+
title={title}
|
|
74
|
+
as={titleAs}
|
|
75
|
+
{...titleProps}
|
|
76
|
+
/>
|
|
77
|
+
{children}
|
|
78
|
+
</header>
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const MemoAppHeader = memo(Header);
|
|
83
|
+
|
|
84
|
+
export interface IHeaderSubComponents {
|
|
85
|
+
MenuContainer: typeof HeaderMenuContainer;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const HeaderWithSubComponents = MemoAppHeader as typeof MemoAppHeader &
|
|
89
|
+
IHeaderSubComponents;
|
|
90
|
+
|
|
91
|
+
HeaderWithSubComponents.MenuContainer = HeaderMenuContainer;
|
|
92
|
+
|
|
93
|
+
export default HeaderWithSubComponents;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { css, cx } from '@emotion/css';
|
|
2
|
+
import { useTheme } from '../..';
|
|
3
|
+
import { HTMLAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export const NAME = 'ucl-uikit-header__border';
|
|
6
|
+
|
|
7
|
+
export interface HeaderBorderProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
testId?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const HeaderBorder = ({
|
|
12
|
+
testId = NAME,
|
|
13
|
+
className,
|
|
14
|
+
...props
|
|
15
|
+
}: HeaderBorderProps) => {
|
|
16
|
+
const [theme] = useTheme();
|
|
17
|
+
|
|
18
|
+
const baseStyle = css`
|
|
19
|
+
position: absolute;
|
|
20
|
+
left: 16px;
|
|
21
|
+
height: 100%;
|
|
22
|
+
width: 16px;
|
|
23
|
+
background-color: ${theme.colour.border.brand};
|
|
24
|
+
|
|
25
|
+
@media (min-width: ${theme.breakpoints.desktop}px) {
|
|
26
|
+
left: 0;
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
const style = cx(NAME, baseStyle, className);
|
|
31
|
+
|
|
32
|
+
const stripeStyle = css`
|
|
33
|
+
position: absolute;
|
|
34
|
+
left: 4px;
|
|
35
|
+
height: 100%;
|
|
36
|
+
width: 4px;
|
|
37
|
+
background-color: ${theme.colour.border.inverse};
|
|
38
|
+
|
|
39
|
+
@media (min-width: ${theme.breakpoints.desktop}px) {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div
|
|
46
|
+
className={style}
|
|
47
|
+
data-test={testId}
|
|
48
|
+
{...props}
|
|
49
|
+
>
|
|
50
|
+
<div className={stripeStyle} />
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default HeaderBorder;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { css, cx } from '@emotion/css';
|
|
2
|
+
import { UclLogoNew, UclLogoProps, useTheme } from '../..';
|
|
3
|
+
|
|
4
|
+
export const NAME = 'ucl-uikit-header__logo';
|
|
5
|
+
|
|
6
|
+
export interface HeaderLogoProps extends UclLogoProps {
|
|
7
|
+
linkHref?: string;
|
|
8
|
+
linkProps?: Record<string, unknown>;
|
|
9
|
+
testId?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const HeaderLogo = ({
|
|
13
|
+
linkHref,
|
|
14
|
+
linkProps,
|
|
15
|
+
testId = NAME,
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
}: HeaderLogoProps) => {
|
|
19
|
+
const [theme] = useTheme();
|
|
20
|
+
|
|
21
|
+
const baseStyle = css`
|
|
22
|
+
display: none;
|
|
23
|
+
height: 29px;
|
|
24
|
+
color: ${theme.colour.fill.brand};
|
|
25
|
+
|
|
26
|
+
@media (min-width: ${theme.breakpoints.desktop}px) {
|
|
27
|
+
display: block;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
const style = cx(NAME, baseStyle, className);
|
|
32
|
+
|
|
33
|
+
const linkStyle = css`
|
|
34
|
+
color: inherit;
|
|
35
|
+
text-decoration: none;
|
|
36
|
+
|
|
37
|
+
&:visited,
|
|
38
|
+
&:active,
|
|
39
|
+
&:hover {
|
|
40
|
+
color: inherit;
|
|
41
|
+
text-decoration: none;
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
|
|
45
|
+
if (linkHref) {
|
|
46
|
+
return (
|
|
47
|
+
<a
|
|
48
|
+
href={linkHref}
|
|
49
|
+
className={linkStyle}
|
|
50
|
+
{...linkProps}
|
|
51
|
+
>
|
|
52
|
+
<UclLogoNew
|
|
53
|
+
className={style}
|
|
54
|
+
data-test={testId}
|
|
55
|
+
{...props}
|
|
56
|
+
/>
|
|
57
|
+
</a>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<UclLogoNew
|
|
63
|
+
className={style}
|
|
64
|
+
data-test={testId}
|
|
65
|
+
{...props}
|
|
66
|
+
/>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export default HeaderLogo;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
import { css, cx } from '@emotion/css';
|
|
3
|
+
|
|
4
|
+
export const NAME = 'ucl-uikit-header__menu-container';
|
|
5
|
+
|
|
6
|
+
export interface HeaderMenuContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const HeaderMenuContainer: React.FC<HeaderMenuContainerProps> = ({
|
|
11
|
+
testId = NAME,
|
|
12
|
+
className,
|
|
13
|
+
children,
|
|
14
|
+
...props
|
|
15
|
+
}) => {
|
|
16
|
+
|
|
17
|
+
const baseStyle = css`
|
|
18
|
+
width: fit-content;
|
|
19
|
+
margin-left: auto;
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
const style = cx(NAME, baseStyle, className);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div
|
|
26
|
+
className={style}
|
|
27
|
+
data-testid={testId}
|
|
28
|
+
{...props}
|
|
29
|
+
>
|
|
30
|
+
{children}
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default HeaderMenuContainer;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { css, cx } from '@emotion/css';
|
|
2
|
+
import { useTheme } from '../..';
|
|
3
|
+
import { HTMLAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export const NAME = 'ucl-uikit-header__title';
|
|
6
|
+
|
|
7
|
+
export interface HeaderTitleProps extends HTMLAttributes<HTMLElement> {
|
|
8
|
+
title: string;
|
|
9
|
+
as?: React.ElementType<React.HTMLAttributes<HTMLElement>>;
|
|
10
|
+
testId?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const HeaderTitle = ({
|
|
14
|
+
title,
|
|
15
|
+
as = 'span',
|
|
16
|
+
testId = NAME,
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}: HeaderTitleProps) => {
|
|
20
|
+
const [theme] = useTheme();
|
|
21
|
+
|
|
22
|
+
const baseStyle = css`
|
|
23
|
+
margin: 0 ${theme.margin.m4};
|
|
24
|
+
height: 29px;
|
|
25
|
+
color: ${theme.colour.text.brandPrimary};
|
|
26
|
+
font-family: ${theme.typography.heading.lg.md.fontFamily};
|
|
27
|
+
font-feature-settings: ${theme.typography.heading.lg.md.fontSettings};
|
|
28
|
+
font-size: ${theme.typography.heading.xs.md.fontSize}px;
|
|
29
|
+
font-weight: ${theme.typography.heading.xs.md.fontWeight};
|
|
30
|
+
|
|
31
|
+
@media (min-width: ${theme.breakpoints.desktop}px) {
|
|
32
|
+
margin: 0 ${theme.margin.m20};
|
|
33
|
+
font-size: ${theme.typography.heading.lg.md.fontSize}px;
|
|
34
|
+
font-weight: ${theme.typography.heading.lg.md.fontWeight};
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
const style = cx(NAME, baseStyle, className);
|
|
39
|
+
|
|
40
|
+
const Comp = as;
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<Comp
|
|
44
|
+
className={style}
|
|
45
|
+
data-test={testId}
|
|
46
|
+
{...props}
|
|
47
|
+
>
|
|
48
|
+
{title}
|
|
49
|
+
</Comp>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default HeaderTitle;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { describe, expect, test } from 'vitest';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import Header from '../Header';
|
|
4
|
+
import { ThemeContextProvider } from '../../../theme/useTheme';
|
|
5
|
+
|
|
6
|
+
describe('Header', () => {
|
|
7
|
+
// Snapshot tests
|
|
8
|
+
|
|
9
|
+
test('snapshot: variant=breadcrumbs', () => {
|
|
10
|
+
const renderResult = render(
|
|
11
|
+
<ThemeContextProvider>
|
|
12
|
+
<Header title='LIDS' />
|
|
13
|
+
</ThemeContextProvider>
|
|
14
|
+
);
|
|
15
|
+
expect(renderResult.container.firstChild).toMatchSnapshot();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('snapshot: variant=avatar', () => {
|
|
19
|
+
const renderResult = render(
|
|
20
|
+
<ThemeContextProvider>
|
|
21
|
+
<Header title='LIDS' />
|
|
22
|
+
</ThemeContextProvider>
|
|
23
|
+
);
|
|
24
|
+
expect(renderResult.container.firstChild).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test('wraps logo/title in a home link when homeLinkHref is provided', () => {
|
|
28
|
+
render(
|
|
29
|
+
<ThemeContextProvider>
|
|
30
|
+
<Header
|
|
31
|
+
title='LIDS'
|
|
32
|
+
homeLinkHref='/'
|
|
33
|
+
homeLinkProps={{ 'aria-label': 'Go home' }}
|
|
34
|
+
/>
|
|
35
|
+
</ThemeContextProvider>
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const link = screen.getByLabelText('Go home');
|
|
39
|
+
expect(link).toBeInTheDocument();
|
|
40
|
+
expect(link.getAttribute('href')).toBe('/');
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`Header > snapshot: variant=avatar 1`] = `
|
|
4
|
+
<header
|
|
5
|
+
class="ucl-uikit-header css-7smbab"
|
|
6
|
+
data-testid="ucl-uikit-header"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="ucl-uikit-header__border css-miu54s"
|
|
10
|
+
data-test="ucl-uikit-header__border"
|
|
11
|
+
>
|
|
12
|
+
<div
|
|
13
|
+
class="css-1l552cj"
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
<svg
|
|
17
|
+
class="ucl-uikit-header__logo css-h3fm3u"
|
|
18
|
+
data-test="ucl-uikit-header__logo"
|
|
19
|
+
fill="none"
|
|
20
|
+
focusable="false"
|
|
21
|
+
viewBox="0 0 1394 391"
|
|
22
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
+
>
|
|
24
|
+
<path
|
|
25
|
+
d="M866.86 257.16V10.54H734.29v125.09h-.03C714.7 63.47 648.56 0 553.74 0S381.7 64.9 361.67 146.92h-.03V10.54H229.91v195.87c0 19.3-2.52 31.04-12.59 41.95s-23.49 15.1-36.08 15.1-26.01-4.2-36.08-15.1c-10.07-10.91-12.59-22.65-12.59-41.95V10.54H0v196.71c0 52.86 10.91 95.65 46.15 130.89C73.84 365.83 118.31 391 178.72 391c52.86 0 99.01-18.46 132.57-54.54 28.44-30.11 43.48-67.53 48.36-100.98h.03C377.14 322.25 454.72 391 553.73 391c87.28 0 158.17-56.74 180.55-135.7v124.49h246.68V257.15H866.85zm-254.59-31.44c-8.39 22.65-31.67 37.76-58.52 37.76-37.76 0-65.66-29.37-65.66-67.96s27.9-67.96 65.66-67.96c26.85 0 50.13 15.1 58.52 37.76h122.02v60.41H612.27z"
|
|
26
|
+
fill="#361a54"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
d="M1393.25 257.11h-42.93v122.64h42.93zm-68.7 0h-39.49v122.64h39.49zm-68.7 0h-36.06v122.64h36.06zm-68.7 0h-32.62v122.64h32.62zm-68.7 0h-29.19v122.64h29.19zm-68.69 0H1024v122.64h25.76zm145.35-179.29c-22.41 5.81-39.12 25.73-40.12 49.72h-.06v14.45h-9.92v23.27L1024 204.58V10.5h369.25v194.08l-121.01-39.32v-23.27h-9.92v-14.45h-.06c-1-23.98-17.71-43.9-40.12-49.72l-9.3-34.7h-8.45l-9.3 34.7z"
|
|
30
|
+
fill="#9a3bff"
|
|
31
|
+
/>
|
|
32
|
+
</svg>
|
|
33
|
+
<div
|
|
34
|
+
class="ucl-uikit-header__title css-118cw9t"
|
|
35
|
+
data-test="ucl-uikit-header__title"
|
|
36
|
+
>
|
|
37
|
+
LIDS
|
|
38
|
+
</div>
|
|
39
|
+
</header>
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
exports[`Header > snapshot: variant=breadcrumbs 1`] = `
|
|
43
|
+
<header
|
|
44
|
+
class="ucl-uikit-header css-7smbab"
|
|
45
|
+
data-testid="ucl-uikit-header"
|
|
46
|
+
>
|
|
47
|
+
<div
|
|
48
|
+
class="ucl-uikit-header__border css-miu54s"
|
|
49
|
+
data-test="ucl-uikit-header__border"
|
|
50
|
+
>
|
|
51
|
+
<div
|
|
52
|
+
class="css-1l552cj"
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
<svg
|
|
56
|
+
class="ucl-uikit-header__logo css-h3fm3u"
|
|
57
|
+
data-test="ucl-uikit-header__logo"
|
|
58
|
+
fill="none"
|
|
59
|
+
focusable="false"
|
|
60
|
+
viewBox="0 0 1394 391"
|
|
61
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
62
|
+
>
|
|
63
|
+
<path
|
|
64
|
+
d="M866.86 257.16V10.54H734.29v125.09h-.03C714.7 63.47 648.56 0 553.74 0S381.7 64.9 361.67 146.92h-.03V10.54H229.91v195.87c0 19.3-2.52 31.04-12.59 41.95s-23.49 15.1-36.08 15.1-26.01-4.2-36.08-15.1c-10.07-10.91-12.59-22.65-12.59-41.95V10.54H0v196.71c0 52.86 10.91 95.65 46.15 130.89C73.84 365.83 118.31 391 178.72 391c52.86 0 99.01-18.46 132.57-54.54 28.44-30.11 43.48-67.53 48.36-100.98h.03C377.14 322.25 454.72 391 553.73 391c87.28 0 158.17-56.74 180.55-135.7v124.49h246.68V257.15H866.85zm-254.59-31.44c-8.39 22.65-31.67 37.76-58.52 37.76-37.76 0-65.66-29.37-65.66-67.96s27.9-67.96 65.66-67.96c26.85 0 50.13 15.1 58.52 37.76h122.02v60.41H612.27z"
|
|
65
|
+
fill="#361a54"
|
|
66
|
+
/>
|
|
67
|
+
<path
|
|
68
|
+
d="M1393.25 257.11h-42.93v122.64h42.93zm-68.7 0h-39.49v122.64h39.49zm-68.7 0h-36.06v122.64h36.06zm-68.7 0h-32.62v122.64h32.62zm-68.7 0h-29.19v122.64h29.19zm-68.69 0H1024v122.64h25.76zm145.35-179.29c-22.41 5.81-39.12 25.73-40.12 49.72h-.06v14.45h-9.92v23.27L1024 204.58V10.5h369.25v194.08l-121.01-39.32v-23.27h-9.92v-14.45h-.06c-1-23.98-17.71-43.9-40.12-49.72l-9.3-34.7h-8.45l-9.3 34.7z"
|
|
69
|
+
fill="#9a3bff"
|
|
70
|
+
/>
|
|
71
|
+
</svg>
|
|
72
|
+
<div
|
|
73
|
+
class="ucl-uikit-header__title css-118cw9t"
|
|
74
|
+
data-test="ucl-uikit-header__title"
|
|
75
|
+
>
|
|
76
|
+
LIDS
|
|
77
|
+
</div>
|
|
78
|
+
</header>
|
|
79
|
+
`;
|
|
@@ -16,73 +16,66 @@ type Story = StoryObj<typeof meta>;
|
|
|
16
16
|
|
|
17
17
|
export const Default: Story = {
|
|
18
18
|
args: {
|
|
19
|
+
level: 'md',
|
|
19
20
|
children: 'Default Heading',
|
|
20
21
|
},
|
|
21
22
|
};
|
|
22
23
|
|
|
23
|
-
export const
|
|
24
|
+
export const LevelXxl: Story = {
|
|
24
25
|
args: {
|
|
25
|
-
level:
|
|
26
|
-
children: 'Heading level
|
|
26
|
+
level: 'xxl',
|
|
27
|
+
children: 'Heading level XXL',
|
|
27
28
|
},
|
|
28
29
|
};
|
|
29
30
|
|
|
30
|
-
export const
|
|
31
|
+
export const LevelXl: Story = {
|
|
31
32
|
args: {
|
|
32
|
-
level:
|
|
33
|
-
children: 'Heading level
|
|
33
|
+
level: 'xl',
|
|
34
|
+
children: 'Heading level XL',
|
|
34
35
|
},
|
|
35
36
|
};
|
|
36
37
|
|
|
37
|
-
export const
|
|
38
|
+
export const LevelLg: Story = {
|
|
38
39
|
args: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
children: 'Heading level 3',
|
|
40
|
+
level: 'lg',
|
|
41
|
+
children: 'Heading level LG',
|
|
42
42
|
},
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
export const
|
|
45
|
+
export const LevelMd: Story = {
|
|
46
46
|
args: {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
children: 'Heading level 4',
|
|
47
|
+
level: 'md',
|
|
48
|
+
children: 'Heading level MD',
|
|
50
49
|
},
|
|
51
50
|
};
|
|
52
51
|
|
|
53
|
-
export const
|
|
54
|
-
name: 'Heading with margins',
|
|
52
|
+
export const LevelSm: Story = {
|
|
55
53
|
args: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
level: 'sm',
|
|
55
|
+
children: 'Heading level SM',
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const LevelXs: Story = {
|
|
60
|
+
args: {
|
|
61
|
+
level: 'xs',
|
|
62
|
+
children: 'Heading level XS',
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const AsSpan: Story = {
|
|
67
|
+
args: {
|
|
68
|
+
as: 'span',
|
|
69
|
+
level: 'lg',
|
|
70
|
+
children: 'Heading rendered as span',
|
|
59
71
|
},
|
|
60
|
-
decorators: [
|
|
61
|
-
(Story) => (
|
|
62
|
-
<div>
|
|
63
|
-
<div
|
|
64
|
-
style={{
|
|
65
|
-
height: '16px',
|
|
66
|
-
backgroundColor: '#CA0007',
|
|
67
|
-
}}
|
|
68
|
-
/>
|
|
69
|
-
<Story />
|
|
70
|
-
<div
|
|
71
|
-
style={{
|
|
72
|
-
height: '16px',
|
|
73
|
-
backgroundColor: '#CA0007',
|
|
74
|
-
}}
|
|
75
|
-
/>
|
|
76
|
-
</div>
|
|
77
|
-
),
|
|
78
|
-
],
|
|
79
72
|
};
|
|
80
73
|
|
|
81
74
|
export const NoMargins: Story = {
|
|
82
|
-
name: '
|
|
75
|
+
name: 'No margins',
|
|
83
76
|
args: {
|
|
84
|
-
|
|
85
|
-
|
|
77
|
+
noMargins: true,
|
|
78
|
+
level: 'md',
|
|
86
79
|
children: 'Heading without margins',
|
|
87
80
|
},
|
|
88
81
|
decorators: [
|