File tree Expand file tree Collapse file tree 2 files changed +23
-23
lines changed
Expand file tree Collapse file tree 2 files changed +23
-23
lines changed Original file line number Diff line number Diff line change 11---
22import Icon from " @ui/Icon.astro" ;
33
4- const {
5- url,
6- class : className = " " ,
7- secondary = false ,
8- outline = false ,
9- disabled = false ,
10- isExternal,
11- icon,
12- iconSvg = false ,
13- iconRight = false
4+ const {
5+ url,
6+ class : className = " " ,
7+ secondary = false ,
8+ outline = false ,
9+ disabled = false ,
10+ isExternal,
11+ icon,
12+ iconSvg = false ,
13+ iconRight = false
1414} = Astro .props ;
1515
1616const resolvedIsExternal = isExternal ?? url ?.startsWith (" http" );
Original file line number Diff line number Diff line change 11---
2- const {
3- name,
4- svg = false ,
5- class : className = " " ,
2+ const {
3+ name,
4+ svg = false ,
5+ class : className = " " ,
66 size = " w-5 h-5" , // Default size (Tailwind)
7- label = " " ,
7+ label = " " ,
88 role = " img"
99} = Astro .props ;
1010---
1111
1212{ svg ? (
13- <svg
14- class = { ` ${size } ${className } ` }
15- aria-label = { label || undefined }
16- role = { label ? role : " presentation" }
13+ <svg
14+ class = { ` ${size } ${className } ` }
15+ aria-label = { label || undefined }
16+ role = { label ? role : " presentation" }
1717 aria-hidden = { ! label }
1818 >
1919 <use href = { ` #${name } ` } />
2020 </svg >
2121) : (
22- <i
23- class = { ` fa-solid fa-${name } ${size } ${className } ` }
24- aria-label = { label || undefined }
25- role = { label ? role : " presentation" }
22+ <i
23+ class = { ` fa-solid fa-${name } ${size } ${className } ` }
24+ aria-label = { label || undefined }
25+ role = { label ? role : " presentation" }
2626 aria-hidden = { ! label }
2727 ></i >
2828)}
You can’t perform that action at this time.
0 commit comments