-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #193 from fedspendingtransparency/ftr/10732-dtui
DEV-10732 dtui sticky column for basic table
- Loading branch information
Showing
21 changed files
with
240 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
import React from 'react'; | ||
import Table from '../../components/table/Table'; | ||
|
||
export default { | ||
title: 'Table new props', | ||
component: Table, | ||
}; | ||
const Default = (args) => | ||
<div style={{width:'400px',overflowX: 'scroll'}}> | ||
<Table {...args} /> | ||
</div>; | ||
export const Primary = Default.bind({}); | ||
Primary.args = { stickyFirstColumn: true, | ||
columns: | ||
[ | ||
{ | ||
title: 'name', | ||
displayName: 'Budget Function' | ||
}, | ||
{ | ||
title: 'amount', | ||
displayName: 'Amount' | ||
}, | ||
{ | ||
title: 'percent', | ||
displayName: '% of Total Amount', | ||
right: true | ||
}, | ||
{ | ||
title: 'test', | ||
displayName: 'test', | ||
}, | ||
{ | ||
title: 'mock1', | ||
displayName: 'Mock Data 1', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
{ | ||
title: 'mock2', | ||
displayName: 'Mock Data 2', | ||
}, | ||
] | ||
, | ||
rows: [ | ||
[<a href="/">Link</a>, 'mock data', '25%', 'test', 'mock1', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2'], | ||
[<React.Fragment><strong>jsx</strong> content</React.Fragment>, 1234, 'mock data', 'test', 'mock1', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2', 'mock2'] | ||
]}; |
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
Oops, something went wrong.