|
1 | 1 | --- |
2 | | -import BulbIcon from '../../assets/icons/lightbulb.svg'; |
3 | | -import NoteIcon from '../../assets/icons/notebook-text.svg'; |
4 | | -import WarningIcon from '../../assets/icons/triangle-alert.svg'; |
| 2 | +import BulbIcon from "../../assets/icons/lightbulb.svg"; |
| 3 | +import NoteIcon from "../../assets/icons/notebook-text.svg"; |
| 4 | +import WarningIcon from "../../assets/icons/triangle-alert.svg"; |
5 | 5 |
|
6 | 6 | interface Props { |
7 | 7 | title: string; |
8 | | - icon: 'note' | 'idea' | 'warning'; |
9 | | - variant?: 'primary' | 'secondary'; |
| 8 | + icon: "note" | "idea" | "warning"; |
| 9 | + variant?: "primary" | "secondary"; |
10 | 10 | } |
11 | 11 |
|
12 | 12 | const { title, icon, variant } = Astro.props; |
13 | 13 |
|
14 | | -const getIconEmoji = (icon: Props['icon']) => { |
| 14 | +const getIconEmoji = (icon: Props["icon"]) => { |
15 | 15 | switch (icon) { |
16 | | - case 'note': |
| 16 | + case "note": |
17 | 17 | return NoteIcon; |
18 | | - case 'idea': |
| 18 | + case "idea": |
19 | 19 | return BulbIcon; |
20 | | - case 'warning': |
| 20 | + case "warning": |
21 | 21 | return WarningIcon; |
22 | 22 | } |
23 | 23 | }; |
24 | 24 |
|
25 | | -const getColors = (variant: Props['variant']) => { |
| 25 | +const getColors = (variant: Props["variant"]) => { |
26 | 26 | switch (variant) { |
27 | | - case 'primary': |
| 27 | + case "primary": |
28 | 28 | case undefined: |
29 | 29 | return { |
30 | | - bg: 'bg-alucards-night', |
31 | | - border: 'border-blinking-blue', |
32 | | - header: 'text-ice-cold-stare', |
| 30 | + bg: "bg-alucards-night", |
| 31 | + border: "border-blinking-blue", |
| 32 | + header: "text-ice-cold-stare", |
33 | 33 | }; |
34 | | - case 'secondary': |
| 34 | + case "secondary": |
35 | 35 | return { |
36 | | - bg: 'bg-sasquatch-socks/10', |
37 | | - border: 'border-sasquatch-socks', |
38 | | - header: 'text-candlelight-peach', |
| 36 | + bg: "bg-sasquatch-socks/10", |
| 37 | + border: "border-sasquatch-socks", |
| 38 | + header: "text-candlelight-peach", |
39 | 39 | }; |
40 | 40 | } |
41 | 41 | }; |
|
0 commit comments