Skip to content

Commit 26b95c6

Browse files
authored
Update ListView chromatic to use Folder illustration (#3457)
* Update ListView chromatic to use Folder illustration * fix lint
1 parent e408aae commit 26b95c6

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

packages/@react-spectrum/list/chromatic/ListView.chromatic.tsx

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {ActionMenu} from '@react-spectrum/menu';
1515
import Add from '@spectrum-icons/workflow/Add';
1616
import {Content, View} from '@react-spectrum/view';
1717
import Delete from '@spectrum-icons/workflow/Delete';
18+
import Folder from '@spectrum-icons/illustrations/Folder';
1819
import {generatePowerset} from '@react-spectrum/story-utils';
1920
import {Grid, repeat} from '@react-spectrum/layout';
2021
import {Heading, Text} from '@react-spectrum/text';
@@ -24,7 +25,6 @@ import Info from '@spectrum-icons/workflow/Info';
2425
import {Item, ListView} from '../';
2526
import {Meta, Story} from '@storybook/react';
2627
import React from 'react';
27-
import {useSlotProps, useStyleProps} from '@react-spectrum/utils';
2828

2929
let states = [
3030
{isQuiet: true},
@@ -89,26 +89,6 @@ const renderActions = (
8989
</>
9090
);
9191

92-
function IllustrationContainer(props) {
93-
props = useSlotProps(props, 'illustration');
94-
let {styleProps} = useStyleProps(props);
95-
return (
96-
<div {...styleProps}>
97-
{props.children}
98-
</div>
99-
);
100-
}
101-
102-
function Folder() {
103-
return (
104-
<IllustrationContainer>
105-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 95.23 67" height="110">
106-
<path fill="var(--spectrum-global-color-gray-600)" d="M94.47,27a4.45,4.45,0,0,0-3.72-2H20.34a5.45,5.45,0,0,0-5.05,3.37L3.12,57.68V3.88A.89.89,0,0,1,4,3H23.21a2.51,2.51,0,0,1,1.69.66l9.7,8.94a1.56,1.56,0,0,0,1,.4h40a1.5,1.5,0,0,1,1.5,1.5v6a1.5,1.5,0,0,0,3,0v-6a4.51,4.51,0,0,0-4.5-4.5H36.21L26.93,1.46A5.48,5.48,0,0,0,23.21,0H4A3.88,3.88,0,0,0,.12,3.88v61h0A1.51,1.51,0,0,0,1.5,67H79a1.49,1.49,0,0,0,1.38-.92L94.89,31.19A4.45,4.45,0,0,0,94.47,27ZM92.12,30,78,64H3.75L18.06,29.52A2.46,2.46,0,0,1,20.34,28H90.75a1.48,1.48,0,0,1,1.37,2Z" />
107-
</svg>
108-
</IllustrationContainer>
109-
);
110-
}
111-
11292
const Template = (): Story => ({combos, ...args}) => (
11393
<Grid columns={repeat(3, '1fr')} autoFlow="row" gap="size-300">
11494
{combos.map(c => {

0 commit comments

Comments
 (0)