apple table

This commit is contained in:
Paul Sealock 2019-04-29 15:47:46 +12:00
parent 88e6626d6a
commit c1adc83676
1 changed files with 34 additions and 6 deletions

View File

@ -1,6 +1,7 @@
/** /**
* External dependencies * External dependencies
*/ */
import { addFilter } from '@wordpress/hooks'; import { addFilter } from '@wordpress/hooks';
import { Fragment } from '@wordpress/element'; import { Fragment } from '@wordpress/element';
import { __ } from '@wordpress/i18n'; import { __ } from '@wordpress/i18n';
@ -8,16 +9,43 @@ import { __ } from '@wordpress/i18n';
/** /**
* WooCommerce dependencies * WooCommerce dependencies
*/ */
import { ReportFilters } from '@woocommerce/components'; import { ReportFilters, TableCard } from '@woocommerce/components';
const Report = ( { path, query } ) => { const Report = ( { path, query } ) => {
return ( return (
<Fragment> <Fragment>
<ReportFilters <ReportFilters query={ query } path={ path } filters={ [] } advancedFilters={ {} } />
query={ query } <TableCard
path={ path } title="Apples"
filters={ [] } headers={ [
advancedFilters={ {} } { label: 'Type', key: 'type' },
{ label: 'Color', key: 'color' },
{ label: 'Taste', key: 'taste' },
] }
rows={ [
[
{ display: 'Granny Smith', value: 'type' },
{ display: 'Green', value: 'color' },
{ display: 'Tangy and sweet', value: 'taste' },
],
[
{ display: 'Golden Delicious', value: 'type' },
{ display: 'Gold', value: 'color' },
{ display: 'Sweet and cheery', value: 'taste' },
],
[
{ display: 'Gala', value: 'type' },
{ display: 'Red', value: 'color' },
{ display: 'Mild, sweet and crisp', value: 'taste' },
],
[
{ display: 'Braeburn', value: 'type' },
{ display: 'Red', value: 'color' },
{ display: 'Firm, crisp and pleasing', value: 'taste' },
],
] }
rowsPerPage={ 100 }
totalRows={ 1 }
/> />
</Fragment> </Fragment>
); );