Add empty state Campaigns card.
This commit is contained in:
parent
2e8b5227e4
commit
30d316886c
|
@ -0,0 +1,27 @@
|
||||||
|
.woocommerce-marketing-campaigns-card {
|
||||||
|
.woocommerce-marketing-campaigns-card-body-empty-content {
|
||||||
|
width: 50%;
|
||||||
|
margin: auto;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
fill: $studio-woocommerce-purple-50;
|
||||||
|
background-color: #f6f7f7;
|
||||||
|
border-radius: 28px;
|
||||||
|
margin-bottom: $gap-smallest;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.woocommerce-marketing-campaigns-card-body-empty-content-title {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 16px;
|
||||||
|
color: $gray-900;
|
||||||
|
margin-bottom: $gap-smallest;
|
||||||
|
}
|
||||||
|
|
||||||
|
div {
|
||||||
|
color: $gray-700;
|
||||||
|
margin-bottom: $gap-smallest;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* External dependencies
|
||||||
|
*/
|
||||||
|
import { __ } from '@wordpress/i18n';
|
||||||
|
import { Button, Card, CardHeader, CardBody } from '@wordpress/components';
|
||||||
|
import { Icon, megaphone } from '@wordpress/icons';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal dependencies
|
||||||
|
*/
|
||||||
|
import { CardHeaderTitle } from '~/marketing/components';
|
||||||
|
import './Campaigns.scss';
|
||||||
|
|
||||||
|
export const Campaigns = () => {
|
||||||
|
return (
|
||||||
|
<Card className="woocommerce-marketing-campaigns-card">
|
||||||
|
<CardHeader>
|
||||||
|
<CardHeaderTitle>
|
||||||
|
{ __( 'Campaigns', 'woocommerce' ) }
|
||||||
|
</CardHeaderTitle>
|
||||||
|
<Button variant="secondary">
|
||||||
|
{ __( 'Create new campaign', 'woocommerce' ) }
|
||||||
|
</Button>
|
||||||
|
</CardHeader>
|
||||||
|
<CardBody className="woocommerce-marketing-campaigns-card-body-empty-content">
|
||||||
|
<Icon icon={ megaphone } size={ 32 } />
|
||||||
|
<div className="woocommerce-marketing-campaigns-card-body-empty-content-title">
|
||||||
|
{ __(
|
||||||
|
'Advertise with marketing campaigns',
|
||||||
|
'woocommerce'
|
||||||
|
) }
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{ __(
|
||||||
|
'Easily create and manage marketing campaigns without leaving WooCommerce.',
|
||||||
|
'woocommerce'
|
||||||
|
) }
|
||||||
|
</div>
|
||||||
|
</CardBody>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
};
|
|
@ -0,0 +1 @@
|
||||||
|
export { Campaigns } from './Campaigns';
|
|
@ -7,6 +7,7 @@ import { useUser } from '@woocommerce/data';
|
||||||
* Internal dependencies
|
* Internal dependencies
|
||||||
*/
|
*/
|
||||||
import { getAdminSetting } from '~/utils/admin-settings';
|
import { getAdminSetting } from '~/utils/admin-settings';
|
||||||
|
import { Campaigns } from './Campaigns';
|
||||||
import { Channels } from './Channels';
|
import { Channels } from './Channels';
|
||||||
import { InstalledExtensions } from './InstalledExtensions';
|
import { InstalledExtensions } from './InstalledExtensions';
|
||||||
import { DiscoverTools } from './DiscoverTools';
|
import { DiscoverTools } from './DiscoverTools';
|
||||||
|
@ -23,6 +24,8 @@ export const MarketingOverviewMultichannel: React.FC = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="woocommerce-marketing-overview-multichannel">
|
<div className="woocommerce-marketing-overview-multichannel">
|
||||||
|
{ /* TODO: show Campaigns card only when there is at least one registered channel. */ }
|
||||||
|
<Campaigns />
|
||||||
<Channels />
|
<Channels />
|
||||||
<InstalledExtensions />
|
<InstalledExtensions />
|
||||||
{ shouldShowExtensions && <DiscoverTools /> }
|
{ shouldShowExtensions && <DiscoverTools /> }
|
||||||
|
|
Loading…
Reference in New Issue