11---
2- import Icon from ' @components/Icon /index.astro'
2+ import Button from ' @components/Button /index.astro'
33
44const { ... rest } = Astro .props
55---
66
77<add-to-calendar {... rest } data-testid =" add-to-calendar" >
8- <button
8+ <Button
99 type =" button"
10- data-calendar-trigger
10+ data-calendar-trigger = { true }
1111 aria-expanded =" false"
12- class =" inline-flex items-center text-content hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none [&_.icon]:fill-content! [&_.icon]:stroke-icons! hover:[&_.icon]:fill-secondary! hover:[&_.icon]:stroke-secondary! focus:[&_.icon]:fill-secondary! focus:[&_.icon]:stroke-secondary!"
12+ variant =" secondary"
13+ size =" small"
14+ icon =" calendar-generic-ical"
15+ iconSize ={ 5 }
16+ class =" normal-case"
1317 >
14- <span class =" [&_.icon]:h-5 [&_.icon]:w-5" >
15- <Icon icon =" calendar-generic-ical" color =" inherit" />
16- </span >
1718 <span class =" ml-2" ><slot >Add to calendar</slot ></span >
18- </button >
19+ </Button >
1920
2021 <div
2122 data-calendar-menu
@@ -24,40 +25,38 @@ const { ...rest } = Astro.props
2425 aria-label =" Add this event to your calendar"
2526 >
2627 <div class =" flex flex-col gap-2" >
27- <a
28+ <Button
2829 data-calendar-link =" google"
2930 href =" https://calendar.google.com/calendar/render"
30- rel =" noopener"
31- class =" flex items-center text-content hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none [&_.icon]:fill-content! [&_.icon]:stroke-icons! hover:[&_.icon]:fill-secondary! hover:[&_.icon]:stroke-secondary! focus:[&_.icon]:fill-secondary! focus:[&_.icon]:stroke-secondary!"
32- >
33- <span class =" [&_.icon]:h-5 [&_.icon]:w-5" >
34- <Icon icon =" calendar-google" color =" inherit" />
35- </span >
36- <span class =" ml-2" >Google Calendar</span >
37- </a >
31+ variant =" secondary"
32+ size =" small"
33+ icon =" calendar-google"
34+ iconSize ={ 5 }
35+ text =" Google Calendar"
36+ class =" normal-case"
37+ />
3838
39- <a
39+ <Button
4040 data-calendar-link =" outlook"
4141 href =" https://outlook.office.com/calendar/0/deeplink/compose"
42- rel =" noopener"
43- class =" flex items-center text-content hover:text-secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none [&_.icon]:fill-content! [&_.icon]:stroke-icons! hover:[&_.icon]:fill-secondary! hover:[&_.icon]:stroke-secondary! focus:[&_.icon]:fill-secondary! focus:[&_.icon]:stroke-secondary!"
44- >
45- <span class =" [&_.icon]:h-5 [&_.icon]:w-5" >
46- <Icon icon =" calendar-outlook" color =" inherit" />
47- </span >
48- <span class =" ml-2" >Outlook</span >
49- </a >
42+ variant =" secondary"
43+ size =" small"
44+ icon =" calendar-outlook"
45+ iconSize ={ 5 }
46+ text =" Outlook"
47+ class =" normal-case"
48+ />
5049
51- <button
50+ <Button
5251 type =" button"
53- data-calendar-download-ics
54- class = " flex items-center text-content hover:text- secondary hover:decoration-secondary focus:text-secondary focus:decoration-secondary focus:outline-none [&_.icon]:fill-content! [&_.icon]:stroke-icons! hover:[&_.icon]:fill-secondary! hover:[&_.icon]:stroke-secondary! focus:[&_.icon]:fill-secondary! focus:[&_.icon]:stroke-secondary! "
55- >
56- < span class = " [&_.icon]:h-5 [&_.icon]:w-5 " >
57- < Icon icon = " calendar_apple " color = " inherit " />
58- </ span >
59- < span class =" ml-2 " >Download .ics</ span >
60- </ button >
52+ data-calendar-download-ics = { true }
53+ variant = " secondary"
54+ size = " small "
55+ icon = " calendar-apple "
56+ iconSize = { 5 }
57+ text = " Download .ics "
58+ class =" normal-case "
59+ / >
6160 </div >
6261 </div >
6362</add-to-calendar>
0 commit comments