Skip to content

Commit 485272a

Browse files
authored
Merge pull request #552 from maiieul/note
2 parents 156e2af + 482bbf9 commit 485272a

File tree

1 file changed

+10
-35
lines changed
  • apps/website/src/components/note

1 file changed

+10
-35
lines changed

apps/website/src/components/note/note.tsx

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { component$, Slot, QwikIntrinsicElements } from '@builder.io/qwik';
33
export enum NoteStatus {
44
Info = 'info',
55
Warning = 'warning',
6-
Success = 'success',
76
Caution = 'caution',
87
}
98

@@ -14,30 +13,27 @@ export interface NoteProps {
1413
function getIconByStatus(status?: NoteStatus) {
1514
switch (status) {
1615
case NoteStatus.Info:
17-
return <InfoIcon class="text-qwikui-purple-500 dark:text-qwikui-blue-700" />;
16+
return <InfoIcon class="text-secondary" />;
1817
case NoteStatus.Warning:
1918
return <WarningIcon class="text-yellow-500" />;
20-
case NoteStatus.Success:
21-
return <SuccessIcon class="text-green-500 dark:text-green-600" />;
2219
case NoteStatus.Caution:
23-
return <CautionIcon class="text-red-600 dark:text-red-700" />;
20+
return <CautionIcon class="text-destructive" />;
21+
2422
default:
25-
return <InfoIcon class="text-qwikui-purple-500 dark:text-qwikui-blue-700" />;
23+
return <InfoIcon class="text-secondary" />;
2624
}
2725
}
2826

2927
function getBackgroundByStatus(status?: NoteStatus) {
3028
switch (status) {
3129
case NoteStatus.Info:
32-
return 'bg-[#ECDDFD] border-qwikui-purple-500 dark:bg-[#0C2944] border-l-2 dark:border-qwikui-blue-700 mb-4 rounded-lg block';
30+
return 'bg-secondary/20 border-secondary border-l-2 mb-4 rounded-lg block';
3331
case NoteStatus.Warning:
34-
return 'bg-[#FBF0CD] dark:bg-[#3B3623] border-yellow-500 border-l-2 dark:border-yellow-500 mb-4 rounded-lg block';
35-
case NoteStatus.Success:
36-
return 'dark:bg-[#103331] bg-[#D2F4DF] border-green-500 border-l-2 dark:border-green-600 mb-4 rounded-lg block';
32+
return 'bg-yellow-500/20 border-yellow-500 border-l-2 mb-4 rounded-lg block';
3733
case NoteStatus.Caution:
38-
return 'bg-[#F8D3D3] border-red-600 dark:bg-[#311727] border-l-2 dark:border-red-700 mb-4 rounded-lg block';
34+
return 'bg-destructive/20 border-destructive border-l-2 mb-4 rounded-lg block';
3935
default:
40-
return 'dark:bg-[#0C2944] border-l-2 dark:border-qwikui-blue-700 mb-4 rounded-lg block';
36+
return 'bg-secondary/20 border-secondary border-l-2 mb-4 rounded-lg block';
4137
}
4238
}
4339

@@ -96,24 +92,6 @@ export function WarningIcon(props: QwikIntrinsicElements['svg'], key: string) {
9692
);
9793
}
9894

99-
export function SuccessIcon(props: QwikIntrinsicElements['svg'], key: string) {
100-
return (
101-
<svg
102-
xmlns="http://www.w3.org/2000/svg"
103-
width="32"
104-
height="32"
105-
viewBox="0 0 256 256"
106-
{...props}
107-
key={key}
108-
>
109-
<g fill="currentColor">
110-
<path d="M224 128a96 96 0 1 1-96-96a96 96 0 0 1 96 96Z" opacity=".2"></path>
111-
<path d="M173.66 98.34a8 8 0 0 1 0 11.32l-56 56a8 8 0 0 1-11.32 0l-24-24a8 8 0 0 1 11.32-11.32L112 148.69l50.34-50.35a8 8 0 0 1 11.32 0ZM232 128A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104Zm-16 0a88 88 0 1 0-88 88a88.1 88.1 0 0 0 88-88Z"></path>
112-
</g>
113-
</svg>
114-
);
115-
}
116-
11795
export function CautionIcon(props: QwikIntrinsicElements['svg'], key: string) {
11896
return (
11997
<svg
@@ -125,11 +103,8 @@ export function CautionIcon(props: QwikIntrinsicElements['svg'], key: string) {
125103
key={key}
126104
>
127105
<g fill="currentColor">
128-
<path
129-
d="M195.88 195.88a96 96 0 0 1-135.76 0L195.88 60.12a96 96 0 0 1 0 135.76Z"
130-
opacity=".2"
131-
></path>
132-
<path d="M201.54 54.46A104 104 0 0 0 54.46 201.54A104 104 0 0 0 201.54 54.46ZM65.78 65.77a88.08 88.08 0 0 1 118.52-5.38L60.38 184.31a88 88 0 0 1 5.4-118.54Zm124.44 124.46a88.1 88.1 0 0 1-118.52 5.38L195.62 71.69a88 88 0 0 1-5.4 118.54Z"></path>
106+
<path d="M224 128a96 96 0 1 1-96-96a96 96 0 0 1 96 96Z" opacity=".2"></path>
107+
<path d="M165.66 101.66L139.31 128l26.35 26.34a8 8 0 0 1-11.32 11.32L128 139.31l-26.34 26.35a8 8 0 0 1-11.32-11.32L116.69 128l-26.35-26.34a8 8 0 0 1 11.32-11.32L128 116.69l26.34-26.35a8 8 0 0 1 11.32 11.32ZM232 128A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104Zm-16 0a88 88 0 1 0-88 88a88.1 88.1 0 0 0 88-88Z"></path>
133108
</g>
134109
</svg>
135110
);

0 commit comments

Comments
 (0)