Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
509 additions
and
236 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 |
---|---|---|
@@ -1,3 +1,40 @@ | ||
html { | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Material Icons'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url(~material-design-icons/iconfont/MaterialIcons-Regular.eot); | ||
src: local('Material Icons'), | ||
local('MaterialIcons-Regular'), | ||
url(~material-design-icons/iconfont/MaterialIcons-Regular.woff2) format('woff2'), | ||
url(~material-design-icons/iconfont/MaterialIcons-Regular.woff) format('woff'), | ||
url(~material-design-icons/iconfont/MaterialIcons-Regular.ttf) format('truetype'); | ||
} | ||
|
||
.material-icons { | ||
font-family: 'Material Icons'; | ||
font-weight: normal; | ||
font-style: normal; | ||
font-size: 24px; /* Preferred icon size */ | ||
display: inline-block; | ||
line-height: 1; | ||
text-transform: none; | ||
letter-spacing: normal; | ||
word-wrap: normal; | ||
white-space: nowrap; | ||
direction: ltr; | ||
|
||
/* Support for all WebKit browsers. */ | ||
-webkit-font-smoothing: antialiased; | ||
/* Support for Safari and Chrome. */ | ||
text-rendering: optimizeLegibility; | ||
|
||
/* Support for Firefox. */ | ||
-moz-osx-font-smoothing: grayscale; | ||
|
||
/* Support for IE. */ | ||
font-feature-settings: 'liga'; | ||
} |
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import tableDataItems from '../constants/sampleMovieData'; | ||
import DataTable from '../../../src/index'; | ||
import ExpandedComponent from '../shared/ExpandedComponent'; | ||
|
||
const columns = [ | ||
{ | ||
name: 'Title', | ||
selector: 'title', | ||
sortable: true, | ||
}, | ||
{ | ||
name: 'Director', | ||
selector: 'director', | ||
sortable: true, | ||
}, | ||
{ | ||
name: 'Genres', | ||
selector: 'genres', | ||
// eslint-disable-next-line react/no-array-index-key | ||
cell: row => row.genres.map((genre, i) => <div key={i}>{genre}</div>), | ||
}, | ||
{ | ||
name: 'Year', | ||
selector: 'year', | ||
sortable: true, | ||
}, | ||
]; | ||
|
||
const ExpandableTable = () => ( | ||
<DataTable | ||
title="Movie List" | ||
columns={columns} | ||
data={tableDataItems} | ||
expandableRows | ||
expandableRowsComponent={<ExpandedComponent />} | ||
/> | ||
); | ||
|
||
storiesOf('Expandable', module) | ||
.add('Basic', ExpandableTable); |
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
50 changes: 50 additions & 0 deletions
50
stories/DataTable/Basic/ExpandableRowDefaultExpanded.stories.js
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,50 @@ | ||
|
||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import tableDataItems from '../constants/sampleMovieData'; | ||
import DataTable from '../../../src/index'; | ||
import ExpandedComponent from '../shared/ExpandedComponent'; | ||
|
||
const columns = [ | ||
{ | ||
name: 'Title', | ||
selector: 'title', | ||
sortable: true, | ||
}, | ||
{ | ||
name: 'Director', | ||
selector: 'director', | ||
sortable: true, | ||
}, | ||
{ | ||
name: 'Genres', | ||
selector: 'genres', | ||
// eslint-disable-next-line react/no-array-index-key | ||
cell: row => row.genres.map((genre, i) => <div key={i}>{genre}</div>), | ||
}, | ||
{ | ||
name: 'Year', | ||
selector: 'year', | ||
sortable: true, | ||
}, | ||
]; | ||
|
||
const BasicTableDefaultRowExpanded = () => { | ||
const data = tableDataItems; | ||
data[0].defaultExpanded = true; | ||
|
||
return ( | ||
<DataTable | ||
title="Movie List - First row expanded" | ||
columns={columns} | ||
data={data} | ||
expandableRows | ||
defaultExpandedField="defaultExpanded" | ||
expandableRowsComponent={<ExpandedComponent />} | ||
/> | ||
); | ||
}; | ||
|
||
|
||
storiesOf('Expandable', module) | ||
.add('Default Expanded Row', BasicTableDefaultRowExpanded); |
Oops, something went wrong.