Skip to content

Commit e17aaa5

Browse files
committed
Add 'id' prop to Icon component and layouts
1 parent 4b2fdcd commit e17aaa5

88 files changed

Lines changed: 329 additions & 123 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/components/CallToAction/Newsletter/layouts/page.astro

Lines changed: 11 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
99
import GDPRConsent from '@components/Consent/Checkbox/index.astro'
1010
import Confetti from '@components/Animations/Confetti/index.astro'
11+
import Icon from '@components/Icon/index.astro'
1112
import type { NewsletterProps } from '@components/CallToAction/Newsletter/client/@types'
1213
1314
export type Props = Omit<NewsletterProps, 'variant'>
@@ -68,44 +69,18 @@ const {
6869
class="relative w-full px-6 py-3 bg-content text-page-base font-bold rounded-lg text-sm transition-all transform hover:-translate-y-0.5 hover:shadow-lg flex items-center justify-center gap-2 hover:bg-primary disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:translate-y-0 focus-visible:outline-none after:pointer-events-none after:absolute after:content-[''] after:inset-0 after:rounded-none after:border-2 after:border-transparent focus-visible:after:-inset-1 focus-visible:after:border-spotlight"
6970
>
7071
<span id="button-text">{buttonText}</span>
71-
<svg
72+
<Icon
73+
icon="exit-right-thin"
74+
size={4}
75+
classes="transition-transform"
7276
id="button-arrow"
73-
class="w-4 h-4 transition-transform"
74-
fill="none"
75-
stroke="currentColor"
76-
viewBox="0 0 24 24"
77-
aria-hidden="true"
78-
focusable="false"
79-
>
80-
<path
81-
stroke-linecap="round"
82-
stroke-linejoin="round"
83-
stroke-width="2"
84-
d="M17 8l4 4m0 0l-4 4m4-4H3"
85-
></path>
86-
</svg>
87-
<svg
77+
/>
78+
<Icon
79+
icon="spinner"
80+
size={4}
81+
classes="hidden animate-spin"
8882
id="button-spinner"
89-
class="hidden w-4 h-4 animate-spin"
90-
fill="none"
91-
viewBox="0 0 24 24"
92-
aria-hidden="true"
93-
focusable="false"
94-
>
95-
<circle
96-
class="opacity-25"
97-
cx="12"
98-
cy="12"
99-
r="10"
100-
stroke="currentColor"
101-
stroke-width="4"
102-
></circle>
103-
<path
104-
class="opacity-75"
105-
fill="currentColor"
106-
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
107-
></path>
108-
</svg>
83+
/>
10984
</button>
11085
</Confetti>
11186

src/components/Icon/icons/alarm-clock.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ export type Props = {
66
accessible: boolean
77
focusable: boolean
88
isListMarker?: boolean
9+
id?: string
910
}
1011
11-
const { color, classes, size, accessible, focusable, isListMarker } = Astro.props
12+
const { color, classes, size, accessible, focusable, isListMarker, id } = Astro.props
1213
---
1314

1415
<svg
16+
id={id}
1517
xmlns="http://www.w3.org/2000/svg"
1618
class:list={["shrink-0", `w-${size} h-${size}`, `text-${color}`, classes, isListMarker ? "mt-0.5" : ""]}
1719
fill="currentColor"

src/components/Icon/icons/apple.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ export type Props = {
66
accessible: boolean
77
focusable: boolean
88
isListMarker?: boolean
9+
id?: string
910
}
1011
11-
const { color, classes, size, accessible, focusable, isListMarker } = Astro.props
12+
const { color, classes, size, accessible, focusable, isListMarker, id } = Astro.props
1213
---
1314

1415
<svg
16+
id={id}
1517
xmlns="http://www.w3.org/2000/svg"
1618
viewBox="0 0 24 24"
1719
class:list={["shrink-0", `w-${size} h-${size}`, `text-${color}`, classes, isListMarker ? "mt-0.5" : ""]}

src/components/Icon/icons/arrow-down.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ export type Props = {
66
accessible: boolean
77
focusable: boolean
88
isListMarker?: boolean
9+
id?: string
910
}
1011
11-
const { color, classes, size, accessible, focusable, isListMarker } = Astro.props
12+
const { color, classes, size, accessible, focusable, isListMarker, id } = Astro.props
1213
---
1314

1415
<svg
16+
id={id}
1517
xmlns="http://www.w3.org/2000/svg"
1618
viewBox="0 0 24 24"
1719
class:list={["shrink-0", `w-${size} h-${size}`, `text-${color}`, classes, isListMarker ? "mt-0.5" : ""]}

src/components/Icon/icons/arrow-left.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ export type Props = {
66
accessible: boolean
77
focusable: boolean
88
isListMarker?: boolean
9+
id?: string
910
}
1011
11-
const { color, classes, size, accessible, focusable, isListMarker } = Astro.props
12+
const { color, classes, size, accessible, focusable, isListMarker, id } = Astro.props
1213
---
1314

1415
<svg
16+
id={id}
1517
xmlns="http://www.w3.org/2000/svg"
1618
class:list={["shrink-0", `w-${size} h-${size}`, `text-${color}`, classes, isListMarker ? "mt-0.5" : ""]}
1719
fill="none"

src/components/Icon/icons/arrow-right.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ export type Props = {
66
accessible: boolean
77
focusable: boolean
88
isListMarker?: boolean
9+
id?: string
910
}
1011
11-
const { color, classes, size, accessible, focusable, isListMarker } = Astro.props
12+
const { color, classes, size, accessible, focusable, isListMarker, id } = Astro.props
1213
---
1314

1415
<svg
16+
id={id}
1517
xmlns="http://www.w3.org/2000/svg"
1618
class:list={["shrink-0", `w-${size} h-${size}`, `text-${color}`, classes, isListMarker ? "mt-0.5" : ""]}
1719
fill="none"

src/components/Icon/icons/avatar.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ export type Props = {
66
accessible: boolean
77
focusable: boolean
88
isListMarker?: boolean
9+
id?: string
910
}
1011
11-
const { color, classes, size, accessible, focusable, isListMarker } = Astro.props
12+
const { color, classes, size, accessible, focusable, isListMarker, id } = Astro.props
1213
---
1314

1415
<svg
16+
id={id}
1517
xmlns="http://www.w3.org/2000/svg"
1618
class:list={["shrink-0", `w-${size} h-${size}`, `text-${color}`, classes, isListMarker ? "mt-0.5" : ""]}
1719
fill="none"

src/components/Icon/icons/award.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ export type Props = {
66
accessible: boolean
77
focusable: boolean
88
isListMarker?: boolean
9+
id?: string
910
}
1011
11-
const { color, classes, size, accessible, focusable, isListMarker } = Astro.props
12+
const { color, classes, size, accessible, focusable, isListMarker, id } = Astro.props
1213
---
1314

1415
<svg
16+
id={id}
1517
xmlns="http://www.w3.org/2000/svg"
1618
viewBox="0 0 24 24"
1719
class:list={["shrink-0", `w-${size} h-${size}`, `text-${color}`, classes, isListMarker ? "mt-0.5" : ""]}

src/components/Icon/icons/bluesky.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ export type Props = {
66
accessible: boolean
77
focusable: boolean
88
isListMarker?: boolean
9+
id?: string
910
}
1011
11-
const { color, classes, size, accessible, focusable, isListMarker } = Astro.props
12+
const { color, classes, size, accessible, focusable, isListMarker, id } = Astro.props
1213
---
1314

1415
<svg
16+
id={id}
1517
xmlns="http://www.w3.org/2000/svg"
1618
viewBox="0 0 24 24"
1719
class:list={["shrink-0", `w-${size} h-${size}`, `text-${color}`, classes, isListMarker ? "mt-0.5" : ""]}

src/components/Icon/icons/book.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ export type Props = {
66
accessible: boolean
77
focusable: boolean
88
isListMarker?: boolean
9+
id?: string
910
}
1011
11-
const { color, classes, size, accessible, focusable, isListMarker } = Astro.props
12+
const { color, classes, size, accessible, focusable, isListMarker, id } = Astro.props
1213
---
1314

1415
<svg
16+
id={id}
1517
xmlns="http://www.w3.org/2000/svg"
1618
class:list={["shrink-0", `w-${size} h-${size}`, `text-${color}`, classes, isListMarker ? "mt-0.5" : ""]}
1719
fill="none"

0 commit comments

Comments
 (0)