diff --git a/.storybook/global.css b/.storybook/global.css new file mode 100644 index 00000000..90159525 --- /dev/null +++ b/.storybook/global.css @@ -0,0 +1,31 @@ +/* Prevent intercom lanucher from showing up */ +.ic-launcher #intercom-container, +.intercom-launcher { + display: none; +} + +* { + box-sizing: border-box; +} + +html, +body { + font-family: 'Source Sans Pro', Helvetica, sans-serif; + height: 100%; + margin: 0; + padding: 0; +} + +a { + text-decoration: none; + color: #00aeef; /** TODO fetch from design tokens **/ +} + +a:hover { + color: #008bbf; +} + +table { + border-spacing: 0; + border-collapse: collapse; +} diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html new file mode 100644 index 00000000..2bfad490 --- /dev/null +++ b/.storybook/preview-head.html @@ -0,0 +1,6 @@ + + + diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index efc0de1f..107378f1 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -1,8 +1,9 @@ import React from 'react'; import { Preview } from '@storybook/react'; import { AnalyticsContextProvider } from '../src/contexts/AnalyticsContext'; -import { ThemeProvider } from '@mui/material'; +import { CssBaseline, ScopedCssBaseline, ThemeProvider } from '@mui/material'; import { theme } from '../src/theme'; +import './global.css'; const preview: Preview = { parameters: { @@ -13,11 +14,18 @@ const preview: Preview = { date: /Date$/, }, }, + options: { + storySort: { + order: ['*', 'Other'], + }, + }, }, decorators: [ (Story) => ( - + + + ), (Story) => ( diff --git a/src/components/DownloadImageDialog/ApplicationInstructions.tsx b/src/components/DownloadImageDialog/ApplicationInstructions.tsx index e2f26114..4cfcbbba 100644 --- a/src/components/DownloadImageDialog/ApplicationInstructions.tsx +++ b/src/components/DownloadImageDialog/ApplicationInstructions.tsx @@ -17,14 +17,7 @@ import { KeysOfUnion, OsSpecificContractInstructions, } from './models'; - -const StyledSpan = styled(Typography)( - ({ theme }) => ` - a { - color: ${theme.typography.link.color} - } -`, -); +import { OrderedListItem } from '../OrderedListItem'; export type OsOptions = ReturnType; @@ -198,25 +191,8 @@ const InstructionsItem = (props: InstructionsItemProps) => { } return ( - - - - {index + 1} - - - + + {hasChildren && ( @@ -225,7 +201,7 @@ const InstructionsItem = (props: InstructionsItemProps) => { })} )} - + ); }; diff --git a/src/components/DownloadImageDialog/DownloadImageDialog.stories.tsx b/src/components/DownloadImageDialog/DownloadImageDialog.stories.tsx index 878e54ec..3e60b453 100644 --- a/src/components/DownloadImageDialog/DownloadImageDialog.stories.tsx +++ b/src/components/DownloadImageDialog/DownloadImageDialog.stories.tsx @@ -823,7 +823,7 @@ const Template = ( }; const meta = { - title: 'Other/DownloadImageDialog', + title: 'Patterns/DownloadImageDialog', component: Template, tags: ['autodocs'], } satisfies Meta; diff --git a/src/components/DownloadImageDialog/ImageForm.tsx b/src/components/DownloadImageDialog/ImageForm.tsx index 4b975662..ffb40368 100644 --- a/src/components/DownloadImageDialog/ImageForm.tsx +++ b/src/components/DownloadImageDialog/ImageForm.tsx @@ -205,7 +205,7 @@ export const ImageForm: React.FC = memo( Select device type{' '} - +