File tree Expand file tree Collapse file tree
Checkbox/client/__fixtures__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
22import { Image } from ' astro:assets'
3- import Icon from ' @components/Icon/index.astro'
43import Button from ' @components/Button/index.astro'
54import CookieSvg from ' @assets/images/site/cookie.svg'
65---
@@ -18,13 +17,15 @@ import CookieSvg from '@assets/images/site/cookie.svg'
1817 >
1918 <h2 id =" consent-modal__title" class =" sr-only" >Cookie consent</h2 >
2019 <!-- Close button positioned at far right of viewport -->
21- <button
20+ <Button
2221 type =" button"
23- aria-label =" Close cookie consent"
22+ variant =" icon"
23+ ariaLabel =" Close cookie consent"
24+ icon =" close"
25+ iconPosition =" only"
26+ iconSize ={ 8 }
2427 class =" consent-modal__close-btn bg-spotlight border-none flex p-1.5 absolute top-0 right-0 transition-all duration-150 ease-in-out hover:bg-spotlight-offset focus:bg-spotlight-offset focus:outline-none z-(--z-raised)"
25- >
26- <Icon icon =" close" size ={ 8 } />
27- </button >
28+ />
2829
2930 <!-- Modal content container with page column constraints -->
3031 <div
Original file line number Diff line number Diff line change 11---
2+ import Button from ' @components/Button/index.astro'
23import ConsentCheckbox from ' @components/Consent/Checkbox/index.astro'
34import type { CheckboxFixtureProps } from ' @components/Consent/Checkbox/client/types'
45
@@ -16,7 +17,7 @@ const { wrapInForm = true, ...props } = fixtureProps
1617 wrapInForm ? (
1718 <form id = " gdpr-consent-form" data-testid = " gdpr-consent-form" >
1819 <ConsentCheckbox { ... props } />
19- <button type = " submit" > Submit</ button >
20+ <Button type = " submit" text = " Submit" / >
2021 </form >
2122 ) : (
2223 <ConsentCheckbox { ... props } />
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ const iconButtonColorClass = [
6060 <slot />
6161 </span >
6262
63+ { /** Not using Button component intentionally */ }
6364 <button
6465 {... rest }
6566 class:list ={ [buttonClass , iconButtonColorClass , floatButtonClass ]}
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ const iconButtonClasses = [
235235 <Icon icon =" feed" color =" inherit" size ={ 8 } />
236236 </a >
237237
238- { /* Page footer Bug Reporter trigger */ }
238+ { /* Page footer Bug Reporter trigger. Not using Button component intentionally. */ }
239239 <button
240240 id =" bugReporterTrigger"
241241 type =" button"
Original file line number Diff line number Diff line change 22import HeadingAnchor from ' @components/Layout/HeadingAnchor/index.astro'
33import Icon from ' @components/Icon/index.astro'
44import List from ' @components/List/index.astro'
5+ import Button from ' @components/Button/index.astro'
56import UnsavedConsentDialog from ' @components/Pages/Consent/unsaved.astro'
67
78export type Props = {
@@ -231,26 +232,28 @@ const { content } = Astro.props
231232 </div >
232233
233234 <div class =" px-6 py-4 flex gap-3 justify-end flex-wrap" >
234- <button
235+ <Button
236+ type =" button"
235237 id =" consent-allow-all"
236- class =" px-6 py-2 bg-success-offset text-content-inverse rounded-lg hover:bg-success transition-colors duration-200 font-medium focus-visible:outline-2 focus-visible:outline-spotlight focus-visible:outline-offset-2 focus-visible:rounded-none"
237- >
238- { content .buttons .acceptAll }
239- </button >
240- <button
238+ text ={ content .buttons .acceptAll }
239+ variant =" success"
240+ class =" px-6 py-2 rounded-lg transition-colors duration-200 font-medium! normal-case focus-visible:outline-2 focus-visible:outline-spotlight focus-visible:outline-offset-2 focus-visible:rounded-none"
241+ />
242+ <Button
243+ type =" button"
241244 id =" consent-deny-all"
242- class =" px-6 py-2 bg-warning-offset text-content-inverse rounded-lg hover:bg-warning transition-colors duration-200 font-medium focus-visible:outline-2 focus-visible:outline-spotlight focus-visible:outline-offset-2 focus-visible:rounded-none"
243- >
244- { content .buttons .rejectAll }
245- </button >
246- <button
245+ text ={ content .buttons .rejectAll }
246+ variant =" warning"
247+ class =" px-6 py-2 rounded-lg transition-colors duration-200 font-medium! normal-case focus-visible:outline-2 focus-visible:outline-spotlight focus-visible:outline-offset-2 focus-visible:rounded-none"
248+ />
249+ <Button
250+ type =" button"
247251 id =" consent-save-preferences"
248- class =" px-6 py-2 text-content-inverse rounded-lg cursor-not-allowed transition-colors duration-200 font-medium focus-visible:outline-2 focus-visible:outline-spotlight focus-visible:outline-offset-2 focus-visible:rounded-none"
252+ text ={ content .buttons .save }
253+ variant =" secondary"
254+ class =" px-6 py-2 bg-secondary text-content-inverse rounded-lg cursor-not-allowed hover:bg-secondary transition-colors duration-200 font-medium! normal-case focus-visible:outline-2 focus-visible:outline-spotlight focus-visible:outline-offset-2 focus-visible:rounded-none"
249255 disabled
250- aria-disabled =" true"
251- >
252- { content .buttons .save }
253- </button >
256+ />
254257 </div >
255258 </section >
256259 </consent-preferences>
You can’t perform that action at this time.
0 commit comments