* Use !important to force padding:0

* Remove card body component
This commit is contained in:
Moon 2021-08-30 12:59:05 -07:00 committed by GitHub
parent 59f0ffd1a6
commit 0a1a07cc54
2 changed files with 39 additions and 51 deletions

View File

@ -4,13 +4,7 @@
import { __ } from '@wordpress/i18n'; import { __ } from '@wordpress/i18n';
import { useSelect } from '@wordpress/data'; import { useSelect } from '@wordpress/data';
import { Fragment } from '@wordpress/element'; import { Fragment } from '@wordpress/element';
import { import { TabPanel, Card, CardHeader, CardFooter } from '@wordpress/components';
TabPanel,
Card,
CardHeader,
CardBody,
CardFooter,
} from '@wordpress/components';
import { get, xor } from 'lodash'; import { get, xor } from 'lodash';
import { import {
EllipsisMenu, EllipsisMenu,
@ -122,46 +116,44 @@ export const StatsOverview = () => {
) } ) }
/> />
</CardHeader> </CardHeader>
<CardBody> <TabPanel
<TabPanel className="woocommerce-stats-overview__tabs"
className="woocommerce-stats-overview__tabs" onSelect={ ( period ) => {
onSelect={ ( period ) => { recordEvent( 'statsoverview_date_picker_update', {
recordEvent( 'statsoverview_date_picker_update', { period,
period, } );
} ); } }
} } tabs={ [
tabs={ [ {
{ title: __( 'Today', 'woocommerce-admin' ),
title: __( 'Today', 'woocommerce-admin' ), name: 'today',
name: 'today', },
}, {
{ title: __( 'Week to date', 'woocommerce-admin' ),
title: __( 'Week to date', 'woocommerce-admin' ), name: 'week',
name: 'week', },
}, {
{ title: __( 'Month to date', 'woocommerce-admin' ),
title: __( 'Month to date', 'woocommerce-admin' ), name: 'month',
name: 'month', },
}, ] }
] } >
> { ( tab ) => (
{ ( tab ) => ( <Fragment>
<Fragment> { ! jetPackIsConnected &&
{ ! jetPackIsConnected && ! userDismissedJetpackInstall && (
! userDismissedJetpackInstall && ( <InstallJetpackCTA />
<InstallJetpackCTA /> ) }
) } <StatsList
<StatsList query={ {
query={ { period: tab.name,
period: tab.name, compare: 'previous_period',
compare: 'previous_period', } }
} } stats={ activeStats }
stats={ activeStats } />
/> </Fragment>
</Fragment> ) }
) } </TabPanel>
</TabPanel>
</CardBody>
<CardFooter> <CardFooter>
<Link <Link
className="woocommerce-stats-overview__more-btn" className="woocommerce-stats-overview__more-btn"

View File

@ -80,10 +80,6 @@
} }
} }
.components-card__body {
padding: 0;
}
.components-card__footer.is-size-large { .components-card__footer.is-size-large {
padding: 0 $gap-smaller; padding: 0 $gap-smaller;
} }