mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-26 21:53:06 +00:00
Merge pull request #112 from fsolla/cursor/pool-i103-cc23cd9a-d9c9
B95 — Polimento busca município no wizard (bullets, gaps, título mobile)
This commit is contained in:
commit
18bcee4454
3 changed files with 19 additions and 3 deletions
|
|
@ -66,7 +66,7 @@ export const CampaignWizardShell = ({
|
||||||
<main
|
<main
|
||||||
aria-labelledby={titleId}
|
aria-labelledby={titleId}
|
||||||
className={cn(
|
className={cn(
|
||||||
'flex flex-1 flex-col py-6 md:justify-start',
|
'flex flex-1 flex-col pt-3 pb-6 md:justify-start md:py-6',
|
||||||
contentAlign === 'end' ? 'justify-end md:justify-start' : 'justify-start',
|
contentAlign === 'end' ? 'justify-end md:justify-start' : 'justify-start',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import {
|
||||||
WIZARD_MUNICIPALITY_STEP_TITLE,
|
WIZARD_MUNICIPALITY_STEP_TITLE,
|
||||||
wizardFlowTitleForSlug,
|
wizardFlowTitleForSlug,
|
||||||
} from '@/lib/campaignWizardCopy'
|
} from '@/lib/campaignWizardCopy'
|
||||||
|
import { HOME_SEARCH_GROUP_LIST_CLASS } from '@/lib/homeSearchUi'
|
||||||
import type { AccessibleMunicipality } from '@/lib/municipalityProximity'
|
import type { AccessibleMunicipality } from '@/lib/municipalityProximity'
|
||||||
import { HOME_SEARCH_QUERY_MAX_LENGTH } from '@/lib/schemas/homeSearch'
|
import { HOME_SEARCH_QUERY_MAX_LENGTH } from '@/lib/schemas/homeSearch'
|
||||||
import {
|
import {
|
||||||
|
|
@ -177,7 +178,7 @@ export const WizardMunicipalitySearchStep = ({
|
||||||
previousHref={previousHref}
|
previousHref={previousHref}
|
||||||
dismissHref={previousHref}
|
dismissHref={previousHref}
|
||||||
>
|
>
|
||||||
<div className="flex flex-col gap-4">
|
<div className="flex flex-col gap-2">
|
||||||
<CampaignSearchInput
|
<CampaignSearchInput
|
||||||
id={WIZARD_MUNICIPALITY_SEARCH_INPUT_ID}
|
id={WIZARD_MUNICIPALITY_SEARCH_INPUT_ID}
|
||||||
label={WIZARD_MUNICIPALITY_SEARCH_LABEL}
|
label={WIZARD_MUNICIPALITY_SEARCH_LABEL}
|
||||||
|
|
@ -202,7 +203,7 @@ export const WizardMunicipalitySearchStep = ({
|
||||||
</p>
|
</p>
|
||||||
) : null}
|
) : null}
|
||||||
{results.status === 'success' && displayRows.length > 0 ? (
|
{results.status === 'success' && displayRows.length > 0 ? (
|
||||||
<ul className="flex flex-col">
|
<ul className={HOME_SEARCH_GROUP_LIST_CLASS}>
|
||||||
{displayRows.map(({ hit, continuityReason }) => (
|
{displayRows.map(({ hit, continuityReason }) => (
|
||||||
<li key={hit.slug}>
|
<li key={hit.slug}>
|
||||||
<HomeSearchHitRow
|
<HomeSearchHitRow
|
||||||
|
|
|
||||||
|
|
@ -136,4 +136,19 @@ describe('CampaignWizardShell', () => {
|
||||||
expect(caption?.textContent).toBe('Cairu')
|
expect(caption?.textContent).toBe('Cairu')
|
||||||
expect(caption?.className).toMatch(/md:block/)
|
expect(caption?.className).toMatch(/md:block/)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('uses tighter top padding on mobile main content', () => {
|
||||||
|
const { container } = renderWizardShell({
|
||||||
|
flowTitle: 'Ajustar votos',
|
||||||
|
stepTitle: WIZARD_MUNICIPALITY_STEP_TITLE,
|
||||||
|
isEntryStep: true,
|
||||||
|
previousHref: '/campanha',
|
||||||
|
children: null,
|
||||||
|
})
|
||||||
|
|
||||||
|
const main = container.querySelector('main')
|
||||||
|
expect(main?.className).toMatch(/pt-3/)
|
||||||
|
expect(main?.className).toMatch(/pb-6/)
|
||||||
|
expect(main?.className).toMatch(/md:py-6/)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue