Browse Source

chore(ui): Add list + list item stories (#31298)

Scott Cooper 3 years ago
parent
commit
5353c52511
1 changed files with 26 additions and 0 deletions
  1. 26 0
      docs-ui/stories/components/list.stories.js

+ 26 - 0
docs-ui/stories/components/list.stories.js

@@ -0,0 +1,26 @@
+import range from 'lodash/range';
+
+import List from 'sentry/components/list';
+import ListItem from 'sentry/components/list/listItem';
+import {listSymbol} from 'sentry/components/list/utils';
+
+export default {
+  title: 'Components/List',
+  argTypes: {
+    symbol: {
+      options: Object.keys(listSymbol),
+      control: {type: 'radio'},
+    },
+  },
+};
+
+export const _List = ({...args}) => {
+  const items = range(0, 10);
+  return (
+    <List {...args}>
+      {items.map(item => (
+        <ListItem key={item}>Item {item + 1}</ListItem>
+      ))}
+    </List>
+  );
+};