-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(storybook): stub out information page, also fix icons (#159)
* feat(storybook): stub out information page, also fix icons * fix(icons): silence eslint complaint for now
- Loading branch information
Jackson Flint-Gonzales
authored
Feb 8, 2023
1 parent
5ff25d8
commit 80c3b0d
Showing
8 changed files
with
125 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
import * as icons from './icons/index.js' | ||
import { createStyledIcon as wrap } from './components' | ||
// import { createStyledIcon as wrap } from './components' | ||
|
||
export const IconAlert = wrap(icons.IconAlert) | ||
export const IconArrowDown = wrap(icons.IconArrowDown) | ||
export const IconArrowLeft = wrap(icons.IconArrowLeft) | ||
export const IconArrowRight = wrap(icons.IconArrowRight) | ||
export const IconArrowUp = wrap(icons.IconArrowUp) | ||
export const IconBuilding = wrap(icons.IconBuilding) | ||
export const IconCheck = wrap(icons.IconCheck) | ||
export const IconChevronDown = wrap(icons.IconChevronDown) | ||
export const IconChevronLeft = wrap(icons.IconChevronLeft) | ||
export const IconChevronRight = wrap(icons.IconChevronRight) | ||
export const IconChevronUp = wrap(icons.IconChevronUp) | ||
export const IconClock = wrap(icons.IconClock) | ||
export const IconClose = wrap(icons.IconClose) | ||
export const IconDocument = wrap(icons.IconDocument) | ||
export const IconGlobe = wrap(icons.IconGlobe) | ||
export const IconInfo = wrap(icons.IconInfo) | ||
export const IconLocation = wrap(icons.IconLocation) | ||
export const IconMail = wrap(icons.IconMail) | ||
export const IconPencil = wrap(icons.IconPencil) | ||
export const IconPhone = wrap(icons.IconPhone) | ||
export const IconSearch = wrap(icons.IconSearch) | ||
export const IconCalendar = wrap(icons.IconCalendar) | ||
export const IconAccessibility = wrap(icons.IconAccessibility) | ||
export const IconArchive = wrap(icons.IconArchive) | ||
export const IconCaution = wrap(icons.IconCaution) | ||
export const IconWIP = wrap(icons.IconWIP) | ||
export const IconChart = wrap(icons.IconChart) | ||
export const IconQuestion = wrap(icons.IconQuestion) | ||
export const IconHamburgerButton = wrap(icons.IconHamburgerButton) | ||
export const IconMinus = wrap(icons.IconMinus) | ||
export const IconPlus = wrap(icons.IconPlus) | ||
export const IconAlert = icons.IconAlert | ||
export const IconArrowDown = icons.IconArrowDown | ||
export const IconArrowLeft = icons.IconArrowLeft | ||
export const IconArrowRight = icons.IconArrowRight | ||
export const IconArrowUp = icons.IconArrowUp | ||
export const IconBuilding = icons.IconBuilding | ||
export const IconCheck = icons.IconCheck | ||
export const IconChevronDown = icons.IconChevronDown | ||
export const IconChevronLeft = icons.IconChevronLeft | ||
export const IconChevronRight = icons.IconChevronRight | ||
export const IconChevronUp = icons.IconChevronUp | ||
export const IconClock = icons.IconClock | ||
export const IconClose = icons.IconClose | ||
export const IconDocument = icons.IconDocument | ||
export const IconGlobe = icons.IconGlobe | ||
export const IconInfo = icons.IconInfo | ||
export const IconLocation = icons.IconLocation | ||
export const IconMail = icons.IconMail | ||
export const IconPencil = icons.IconPencil | ||
export const IconPhone = icons.IconPhone | ||
export const IconSearch = icons.IconSearch | ||
export const IconCalendar = icons.IconCalendar | ||
export const IconAccessibility = icons.IconAccessibility | ||
export const IconArchive = icons.IconArchive | ||
export const IconCaution = icons.IconCaution | ||
export const IconWIP = icons.IconWIP | ||
export const IconChart = icons.IconChart | ||
export const IconQuestion = icons.IconQuestion | ||
export const IconHamburgerButton = icons.IconHamburgerButton | ||
export const IconMinus = icons.IconMinus | ||
export const IconPlus = icons.IconPlus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import React from 'react' | ||
import { | ||
Box, | ||
DisplayLg, | ||
Section, | ||
TitleXl, | ||
TitleXs | ||
} from '../../react' | ||
|
||
/** @type {import('@storybook/addons').StoryContext} */ | ||
export default { | ||
args: { | ||
title: 'An information page', | ||
subtitle: 'Here is more information on the information page', | ||
contentSections: [ | ||
{ | ||
id: 1, | ||
type: 'custom-section', | ||
title: 'San Francisco', | ||
children: <p>Hello!</p> | ||
}, | ||
{ | ||
id: 2, | ||
type: 'image', | ||
src: 'https://sf.gov/sites/default/files/styles/836x484/public/2022-09/SF%20Prepared.png?itok=3JTfkksh' | ||
}, | ||
{ | ||
id: 3, | ||
type: 'custom-section', | ||
title: 'San Francisco', | ||
children: <p>Hello!</p> | ||
}, | ||
{ | ||
id: 4, | ||
type: 'custom-section', | ||
title: 'San Francisco', | ||
children: <p>Hello!</p> | ||
} | ||
] | ||
}, | ||
argTypes: { | ||
}, | ||
parameters: { | ||
design: { | ||
type: 'figma', | ||
url: 'https://www.figma.com/file/Ssyjx39mPsBSbqy7FDWwBk/Wireframes---Corey?node-id=1%3A10765&t=aOZrbzRCBt9KKM0B-0' | ||
} | ||
} | ||
} | ||
|
||
export const InformationPage = ({ title, subtitle, contentSections }) => ( | ||
<Section> | ||
<DisplayLg css={{ mb: 28 }}>{title}</DisplayLg> | ||
<TitleXs>{subtitle}</TitleXs> | ||
{contentSections.map(section => { | ||
let content = ( | ||
<> | ||
<TitleXl>{section.title}</TitleXl> | ||
{section.children} | ||
</> | ||
) | ||
if (section.type === 'image') { | ||
content = <img style={{ objectFit: 'contain' }} src={section.src} /> | ||
} | ||
|
||
return ( | ||
<Box key={section.id} css={{ my: 48 }}> | ||
{content} | ||
</Box> | ||
) | ||
})} | ||
</Section> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters