/** @format */ /** * External dependencies */ import { __ } from '@wordpress/i18n'; import { ToggleControl } from '@wordpress/components'; import { Component } from '@wordpress/element'; /** * Internal dependencies */ import Card from 'components/card'; import { EllipsisMenu, MenuItem, MenuTitle } from 'components/ellipsis-menu'; import { SummaryList, SummaryNumber } from 'components/summary'; import './style.scss'; class StorePerformance extends Component { constructor() { super( ...arguments ); this.state = { showCustomers: true, showProducts: true, showOrders: true, }; this.toggle = this.toggle.bind( this ); } toggle( type ) { return () => { this.setState( state => ( { [ type ]: ! state[ type ] } ) ); }; } renderMenu() { return ( { __( 'Display Stats:', 'wc-admin' ) } ); } render() { const totalOrders = 10; const totalProducts = 1000; const { showCustomers, showProducts, showOrders } = this.state; return ( { showCustomers && ( ) } { showProducts && ( ) } { showOrders && ( ) } ); } } export default StorePerformance;