Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tree Grid Component #2181

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ export TrialBarButton from './trial-bar/button';
export SLDSTrialBarButton from './trial-bar/button';
export TrialBarDropdown from './trial-bar/dropdown';
export SLDSTrialBarDropdown from './trial-bar/dropdown';
export SLDSTreeGrid from './tree-grid';
export TreeGrid from './tree-grid';
export UNSAFE_DirectionSettings from './utilities/UNSAFE_direction';
export UtilityIcon from './utilities/utility-icon';
export SLDSUtilityIcon from './utilities/utility-icon';
Expand Down
26 changes: 26 additions & 0 deletions components/tree-grid/__docs__/storybook-stories.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';

import { TREE_GRID } from '../../../utilities/constants';
import Default from '../__examples__/default';
import Headless from '../__examples__/headless';

storiesOf(TREE_GRID, module)
.addDecorator((getStory) => (
<div className="slds-p-around_medium">{getStory()}</div>
))
.add('Default', () => <Default action={action} />)
.add('Single Select', () => <Default action={action} selectRows="single" />)
.add('w/o Border', () => <Default action={action} isBorderless />)
.add('Single Select w/o Border', () => (
<Default action={action} selectRows="single" isBorderless />
))
.add('Headless Single Select w/ Border', () => (
<Headless action={action} selectRows="single" />
))
.add('Headless w/ Border', () => <Headless action={action} />)
.add('Headless Single Select w/o Border', () => (
<Headless action={action} selectRows="single" isBorderless />
))
.add('Headless w/o Border', () => <Headless action={action} isBorderless />);
Loading