Skip to content

Commit

Permalink
feat: update ui to use is-narrow card
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredrethman committed Nov 28, 2024
1 parent 7b3c2d1 commit 8bf31f0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
6 changes: 2 additions & 4 deletions src/admin/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -273,16 +273,14 @@ table.fixed {
}
}

&.newspack-card__is-center {
margin-inline: auto;
max-width: 575px;
&.newspack-card__is-narrow {
padding: 3rem 4rem;

h2 {
margin-block-start: 0;
}

p {
p:last-of-type {
margin-block: 0 2rem;
}
}
Expand Down
6 changes: 2 additions & 4 deletions src/wizards/audience/views/subscriptions/configuration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ import { __ } from '@wordpress/i18n';
*/
import WizardsTab from '../../../wizards-tab';
import WizardSection from '../../../wizards-section';
import WizardsActionCard from '../../../wizards-action-card';
import { Button, Card } from '../../../../components/src';
import WizardsCard from '../../../wizards-card';

function Configuration() {
return (
<WizardsTab title={ __( 'Configuration', 'newspack-plugin' ) }>
<WizardSection>
<WizardsCard className="newspack-card__is-center">
<Card isNarrow>
<h2>
{ __(
'Manage Subscriptions settings in Woo Memberships',
Expand All @@ -32,7 +30,7 @@ function Configuration() {
<Button variant="primary" href={ '#' }>
{ __( 'Manage Subscriptions', 'newspack-plugin' ) }
</Button>
</WizardsCard>
</Card>
</WizardSection>
</WizardsTab>
);
Expand Down
2 changes: 1 addition & 1 deletion src/wizards/audience/views/subscriptions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function AudienceSubscriptions() {
'newspack-plugin'
) }
sections={ tabs }
// requiredPlugins={ [ 'woocommerce', 'woocommerce-memberships' ] }
requiredPlugins={ [ 'woocommerce', 'woocommerce-memberships' ] }
/>
);
}
Expand Down
7 changes: 3 additions & 4 deletions src/wizards/audience/views/subscriptions/revenue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import { Button } from '../../../../components/src';
import WizardsCard from '../../../wizards-card';
import { Button, Card } from '../../../../components/src';
import WizardSection from '../../../wizards-section';
import WizardsTab from '../../../wizards-tab';

function Revenue() {
return (
<WizardsTab title={ __( 'Revenue', 'newspack-plugin' ) }>
<WizardSection>
<WizardsCard className="newspack-card__is-center">
<Card isNarrow>
<h2>
{ __(
'Manage Subscriptions settings in Woo Memberships',
Expand All @@ -31,7 +30,7 @@ function Revenue() {
<Button variant="primary" href={ '#' }>
{ __( 'Manage Subscriptions', 'newspack-plugin' ) }
</Button>
</WizardsCard>
</Card>
</WizardSection>
</WizardsTab>
);
Expand Down
2 changes: 0 additions & 2 deletions src/wizards/audience/views/subscriptions/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import { Button } from '../../../../components/src';
import WizardsCard from '../../../wizards-card';
import WizardSection from '../../../wizards-section';
import WizardsTab from '../../../wizards-tab';
import BillingFields from '../../components/billing-fields';
Expand Down

0 comments on commit 8bf31f0

Please sign in to comment.