This commit is contained in:
Joshua T Flowers 2019-11-21 20:10:37 +08:00 committed by GitHub
parent 1f4e2fcdfe
commit 940716d7f5
2 changed files with 7 additions and 3 deletions

View File

@ -49,14 +49,15 @@ export class Leaderboard extends Component {
render() { render() {
const { isRequesting, isError, totalRows, title } = this.props; const { isRequesting, isError, totalRows, title } = this.props;
const rows = this.getFormattedRows(); const rows = this.getFormattedRows();
const classes = 'woocommerce-leaderboard woocommerce-analytics__card';
if ( isError ) { if ( isError ) {
return <ReportError className="woocommerce-leaderboard" isError />; return <ReportError className={ classes } isError />;
} }
if ( ! isRequesting && rows.length === 0 ) { if ( ! isRequesting && rows.length === 0 ) {
return ( return (
<Card title={ title } className="woocommerce-leaderboard woocommerce-analytics__card"> <Card title={ title } className={ classes }>
<EmptyTable> <EmptyTable>
{ __( 'No data recorded for the selected time period.', 'woocommerce-admin' ) } { __( 'No data recorded for the selected time period.', 'woocommerce-admin' ) }
</EmptyTable> </EmptyTable>
@ -66,7 +67,7 @@ export class Leaderboard extends Component {
return ( return (
<TableCard <TableCard
className="woocommerce-leaderboard" className={ classes }
headers={ this.getFormattedHeaders() } headers={ this.getFormattedHeaders() }
isLoading={ isRequesting } isLoading={ isRequesting }
rows={ rows } rows={ rows }

View File

@ -13,6 +13,9 @@
} }
} }
// @todo Once we switch to the Gutenberg `Card` component, we should probably
// drop this class and override all cards within the wc-admin scope or make an
// exportable card based on the Gutenberg component that houses wc-admin styles.
.woocommerce-analytics__card { .woocommerce-analytics__card {
border-radius: 0; border-radius: 0;
border: 1px solid $core-grey-light-700; border: 1px solid $core-grey-light-700;