-
Notifications
You must be signed in to change notification settings - Fork 25
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 #3733 from grommet/data-feedback
Update Data docs based on feedback
- Loading branch information
Showing
10 changed files
with
99 additions
and
75 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
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,11 +1,13 @@ | ||
import React from 'react'; | ||
import { Data, DataFilter } from 'grommet'; | ||
import { Data, DataFilter, Toolbar } from 'grommet'; | ||
import applications from '../../../data/mockData/applications.json'; | ||
|
||
export const DataFilterExample = () => { | ||
return ( | ||
<Data data={applications}> | ||
<DataFilter property="delivery" /> | ||
<Toolbar> | ||
<DataFilter property="delivery" /> | ||
</Toolbar> | ||
</Data> | ||
); | ||
}; |
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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import React from 'react'; | ||
import { Data, DataSearch } from 'grommet'; | ||
import { Data, DataSearch, Toolbar } from 'grommet'; | ||
import applications from '../../../data/mockData/applications.json'; | ||
|
||
export const DataSearchExample = () => { | ||
return ( | ||
<Data data={applications}> | ||
<DataSearch /> | ||
<Toolbar> | ||
<DataSearch /> | ||
</Toolbar> | ||
</Data> | ||
); | ||
}; |
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,11 +1,13 @@ | ||
import React from 'react'; | ||
import { Data, DataSort } from 'grommet'; | ||
import { Data, DataSort, Toolbar } from 'grommet'; | ||
import applications from '../../../data/mockData/applications.json'; | ||
|
||
export const DataSortExample = () => { | ||
return ( | ||
<Data data={applications}> | ||
<DataSort drop /> | ||
<Toolbar> | ||
<DataSort drop /> | ||
</Toolbar> | ||
</Data> | ||
); | ||
}; |
62 changes: 32 additions & 30 deletions
62
aries-site/src/examples/components/data/DataTableColumnsExample.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 |
---|---|---|
@@ -1,39 +1,41 @@ | ||
import React from 'react'; | ||
import { Data, DataTableColumns } from 'grommet'; | ||
import { Data, DataTableColumns, Toolbar } from 'grommet'; | ||
import applications from '../../../data/mockData/applications.json'; | ||
|
||
export const DataTableColumnsExample = () => { | ||
return ( | ||
<Data data={applications}> | ||
<DataTableColumns | ||
options={[ | ||
{ | ||
property: 'title', | ||
label: 'Title', | ||
}, | ||
{ | ||
property: 'publisher', | ||
label: 'Publisher', | ||
}, | ||
{ | ||
property: 'categories', | ||
label: 'Categories', | ||
}, | ||
{ | ||
property: 'rating', | ||
label: 'Rating', | ||
}, | ||
{ | ||
property: 'pricing', | ||
label: 'Pricing', | ||
}, | ||
{ | ||
property: 'delivery', | ||
label: 'Delivery', | ||
}, | ||
]} | ||
drop | ||
/> | ||
<Toolbar> | ||
<DataTableColumns | ||
options={[ | ||
{ | ||
property: 'title', | ||
label: 'Title', | ||
}, | ||
{ | ||
property: 'publisher', | ||
label: 'Publisher', | ||
}, | ||
{ | ||
property: 'categories', | ||
label: 'Categories', | ||
}, | ||
{ | ||
property: 'rating', | ||
label: 'Rating', | ||
}, | ||
{ | ||
property: 'pricing', | ||
label: 'Pricing', | ||
}, | ||
{ | ||
property: 'delivery', | ||
label: 'Delivery', | ||
}, | ||
]} | ||
drop | ||
/> | ||
</Toolbar> | ||
</Data> | ||
); | ||
}; |
60 changes: 31 additions & 29 deletions
60
aries-site/src/examples/components/data/DataTableGroupByExample.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 |
---|---|---|
@@ -1,38 +1,40 @@ | ||
import React from 'react'; | ||
import { Data, DataTableGroupBy } from 'grommet'; | ||
import { Data, DataTableGroupBy, Toolbar } from 'grommet'; | ||
import applications from '../../../data/mockData/applications.json'; | ||
|
||
export const DataTableGroupByExample = () => { | ||
return ( | ||
<Data data={applications}> | ||
<DataTableGroupBy | ||
options={[ | ||
{ | ||
property: 'categories', | ||
label: 'Categories', | ||
}, | ||
{ | ||
property: 'delivery', | ||
label: 'Delivery', | ||
}, | ||
{ | ||
property: 'pricing', | ||
label: 'Pricing', | ||
}, | ||
{ | ||
property: 'publisher', | ||
label: 'Publisher', | ||
}, | ||
{ | ||
property: 'rating', | ||
label: 'Rating', | ||
}, | ||
{ | ||
property: 'title', | ||
label: 'Title', | ||
}, | ||
]} | ||
/> | ||
<Toolbar> | ||
<DataTableGroupBy | ||
options={[ | ||
{ | ||
property: 'categories', | ||
label: 'Categories', | ||
}, | ||
{ | ||
property: 'delivery', | ||
label: 'Delivery', | ||
}, | ||
{ | ||
property: 'pricing', | ||
label: 'Pricing', | ||
}, | ||
{ | ||
property: 'publisher', | ||
label: 'Publisher', | ||
}, | ||
{ | ||
property: 'rating', | ||
label: 'Rating', | ||
}, | ||
{ | ||
property: 'title', | ||
label: 'Title', | ||
}, | ||
]} | ||
/> | ||
</Toolbar> | ||
</Data> | ||
); | ||
}; |
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