Skip to content

Commit

Permalink
a4a update pressable plan selection
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-lysenko committed Apr 1, 2024
1 parent 30a9365 commit 348c656
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,27 +69,28 @@ export default function PlanSelectionFilter( { selectedPlan, plans, onSelectPlan
return (
<section className="pressable-overview-plan-selection__filter">
<div className="pressable-overview-plan-selection__filter-type">
<strong className="pressable-overview-plan-selection__filter-label">
<p className="pressable-overview-plan-selection__filter-label">
{ translate( 'Filter by:' ) }
</strong>
</p>
<div className="pressable-overview-plan-selection__filter-buttons">
<Button
className={ classNames( 'pressable-overview-plan-selection__filter-button', {
'is-selected': filterType === FILTER_TYPE_INSTALL,
} ) }
onClick={ onSelectInstallFilterType }
>
{ translate( 'WordPress installs' ) }
</Button>

<Button
className={ classNames( 'pressable-overview-plan-selection__filter-button', {
'is-selected': filterType === FILTER_TYPE_INSTALL,
} ) }
onClick={ onSelectInstallFilterType }
>
{ translate( 'WordPress installs' ) }
</Button>

<Button
className={ classNames( 'pressable-overview-plan-selection__filter-button', {
'is-selected': filterType === FILTER_TYPE_VISITS,
} ) }
onClick={ onSelectVisitFilterType }
>
{ translate( 'Number of visits' ) }
</Button>
<Button
className={ classNames( 'pressable-overview-plan-selection__filter-button', {
'is-selected': filterType === FILTER_TYPE_VISITS,
} ) }
onClick={ onSelectVisitFilterType }
>
{ translate( 'Number of visits' ) }
</Button>
</div>
</div>

<A4ASlider value={ selectedOption } onChange={ onSelectOption } options={ options } />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,40 @@

align-items: center;
justify-content: center;

.pressable-overview-plan-selection__filter-label {
font-weight: 600;
font-size: 1rem;
margin: 0;
}

.pressable-overview-plan-selection__filter-buttons {
button:first-child {
margin-inline-end: 1rem;
}
}

@include breakpoint-deprecated( "<660px" ) {
display: block;
margin: 0;
text-align: center;

.pressable-overview-plan-selection__filter-label {
width: 100%;
margin-block-end: 0.5rem;
}

.pressable-overview-plan-selection__filter-buttons {
display: inline-flex;
justify-content: space-around;
width: 100%;
button {
width: 50%;
text-align: center;
justify-content: center;
}
}
}
}

.components-button.pressable-overview-plan-selection__filter-button {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ button.product-card__select-button {
width: 100%;
justify-content: space-between;
gap: 0.5rem;

@include breakpoint-deprecated( "<660px" ) {
display: block;

.product-card__select-button {
margin-block-start: 0.5rem;
width: 100%;
justify-content: center;
text-align: center;
font-size: 1rem;
}
}
}

.product-card__heading {
Expand Down

0 comments on commit 348c656

Please sign in to comment.