-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: remove Grid and Section from exports (#1876)
- these two are marked as deprecated so remove them - they are, however, still used in the documentation pages - redo the imports in those story pages to allow for this - update snapshots for PopoverContainer
- Loading branch information
1 parent
13fbc18
commit a0ec79a
Showing
23 changed files
with
191 additions
and
24 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
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
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
3 changes: 2 additions & 1 deletion
3
.storybook/components/DesignTokens/Tier1/TypographyPresets.jsx
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
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
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
33 changes: 33 additions & 0 deletions
33
src/components/PopoverContainer/PopoverContainer.stories.tsx
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,33 @@ | ||
import type { StoryObj, Meta } from '@storybook/react'; | ||
import React from 'react'; | ||
|
||
import { PopoverContainer } from './PopoverContainer'; | ||
import PopoverListItem from '../PopoverListItem'; | ||
|
||
export default { | ||
title: 'Components/PopoverContainer', | ||
component: PopoverContainer, | ||
parameters: { | ||
badges: ['1.2'], | ||
}, | ||
decorators: [(Story) => <div className="p-8">{Story()}</div>], | ||
} as Meta<Args>; | ||
|
||
type Args = React.ComponentProps<typeof PopoverContainer>; | ||
|
||
export const Default: StoryObj<Args> = { | ||
args: { | ||
children: 'Default container', | ||
}, | ||
}; | ||
|
||
export const WithRows: StoryObj<Args> = { | ||
render: () => ( | ||
<PopoverContainer> | ||
<PopoverListItem icon="arrow-downward">test 1</PopoverListItem> | ||
<PopoverListItem icon="arrow-narrow-left">test 2</PopoverListItem> | ||
<PopoverListItem icon="arrow-upward">test 3</PopoverListItem> | ||
<PopoverListItem icon="arrow-narrow-right">test 4</PopoverListItem> | ||
</PopoverContainer> | ||
), | ||
}; |
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,7 @@ | ||
import { generateSnapshots } from '@chanzuckerberg/story-utils'; | ||
import type { StoryFile } from '@storybook/testing-react'; | ||
import * as stories from './PopoverContainer.stories'; | ||
|
||
describe('<PopoverContainer />', () => { | ||
generateSnapshots(stories as StoryFile); | ||
}); |
116 changes: 116 additions & 0 deletions
116
src/components/PopoverContainer/__snapshots__/PopoverContainer.test.ts.snap
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,116 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<PopoverContainer /> Default story renders snapshot 1`] = ` | ||
<div | ||
class="p-8" | ||
> | ||
<div | ||
class="popover-container" | ||
> | ||
Default container | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`<PopoverContainer /> WithRows story renders snapshot 1`] = ` | ||
<div | ||
class="p-8" | ||
> | ||
<div | ||
class="popover-container" | ||
> | ||
<div | ||
class="popover-list-item" | ||
> | ||
<div | ||
class="popover-list-item__icon" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
class="icon" | ||
fill="currentColor" | ||
height="1.5rem" | ||
style="--icon-size: 1.5rem;" | ||
viewBox="0 0 24 24" | ||
width="1.5rem" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M11 5v11.17l-4.88-4.88c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.02 0 1.41l6.59 6.59c.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41-.39-.39-1.02-.39-1.41 0L13 16.17V5c0-.55-.45-1-1-1s-1 .45-1 1z" | ||
/> | ||
</svg> | ||
</div> | ||
test 1 | ||
</div> | ||
<div | ||
class="popover-list-item" | ||
> | ||
<div | ||
class="popover-list-item__icon" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
class="icon" | ||
fill="currentColor" | ||
height="1.5rem" | ||
style="--icon-size: 1.5rem;" | ||
viewBox="0 0 24 24" | ||
width="1.5rem" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M9.7,18.3L9.7,18.3c0.39-0.39,0.39-1.02,0-1.41L5.83,13H21c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H5.83l3.88-3.88 c0.39-0.39,0.39-1.02,0-1.41l0,0c-0.39-0.39-1.02-0.39-1.41,0L2.7,11.3c-0.39,0.39-0.39,1.02,0,1.41l5.59,5.59 C8.68,18.68,9.32,18.68,9.7,18.3z" | ||
/> | ||
</svg> | ||
</div> | ||
test 2 | ||
</div> | ||
<div | ||
class="popover-list-item" | ||
> | ||
<div | ||
class="popover-list-item__icon" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
class="icon" | ||
fill="currentColor" | ||
height="1.5rem" | ||
style="--icon-size: 1.5rem;" | ||
viewBox="0 0 24 24" | ||
width="1.5rem" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M13 19V7.83l4.88 4.88c.39.39 1.03.39 1.42 0 .39-.39.39-1.02 0-1.41l-6.59-6.59c-.39-.39-1.02-.39-1.41 0l-6.6 6.58c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L11 7.83V19c0 .55.45 1 1 1s1-.45 1-1z" | ||
/> | ||
</svg> | ||
</div> | ||
test 3 | ||
</div> | ||
<div | ||
class="popover-list-item" | ||
> | ||
<div | ||
class="popover-list-item__icon" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
class="icon" | ||
fill="currentColor" | ||
height="1.5rem" | ||
style="--icon-size: 1.5rem;" | ||
viewBox="0 0 24 24" | ||
width="1.5rem" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M14.29,5.71L14.29,5.71c-0.39,0.39-0.39,1.02,0,1.41L18.17,11H3c-0.55,0-1,0.45-1,1v0c0,0.55,0.45,1,1,1h15.18l-3.88,3.88 c-0.39,0.39-0.39,1.02,0,1.41l0,0c0.39,0.39,1.02,0.39,1.41,0l5.59-5.59c0.39-0.39,0.39-1.02,0-1.41L15.7,5.71 C15.32,5.32,14.68,5.32,14.29,5.71z" | ||
/> | ||
</svg> | ||
</div> | ||
test 4 | ||
</div> | ||
</div> | ||
</div> | ||
`; |
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