Skip to content

Commit 1ad30ee

Browse files
committed
Fix submit button positioning on mobile and bottom margin in newsletter CTAs
1 parent 7baade3 commit 1ad30ee

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

‎src/components/Animations/Confetti/index.astro‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,18 @@
44
*
55
* The client web component respects global animation lifecycle state via the store.
66
*/
7+
export interface Props {
8+
/** Additional classes to add to the component wrapper */
9+
classes: string
10+
}
11+
12+
const { classes } = Astro.props
713
---
814

9-
<confetti-animation class="confetti-animation relative block" data-testid="confetti-animation">
15+
<confetti-animation
16+
class:list={["confetti-animation relative block", classes]}
17+
data-testid="confetti-animation"
18+
>
1019
<canvas
1120
data-confetti-canvas
1221
aria-hidden="true"

‎src/components/CallToAction/Newsletter/layouts/article.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const buttonText = 'Subscribe'
2929
</p>
3030

3131
<form id="newsletter-form" class="space-y-4">
32-
<div class="flex gap-3 pt-4">
32+
<div class="flex flex-col md:flex-row gap-3 pt-4">
3333
<div class="relative flex items-center gap-2 flex-1 after:pointer-events-none after:absolute after:content-[''] after:inset-0 after:rounded-none after:border-2 after:border-transparent focus-within:after:-inset-1 focus-within:after:border-spotlight">
3434
<span class="text-success">$</span>
3535
<label id="newsletter-email-label" for="newsletter-email" class="sr-only">
@@ -45,7 +45,7 @@ const buttonText = 'Subscribe'
4545
aria-describedby="newsletter-message"
4646
/>
4747
</div>
48-
<Confetti>
48+
<Confetti classes="self-end md:self-auto">
4949
{/** Intentionally not using Button component. */}
5050
<button
5151
type="submit"

0 commit comments

Comments
 (0)