Skip to content

Commit 251e89f

Browse files
authored
fix: notice btns not matching colour of notice + gap issue (#4823)
* feat: improve notices * fix: bottom gap for notices * fix: lint * fix: lint
1 parent 4fbbc2b commit 251e89f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

apps/frontend/src/pages/hosting/manage/[id].vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div
33
v-if="filteredNotices.length > 0"
4-
class="experimental-styles-within relative mx-auto flex w-full min-w-0 max-w-[1280px] flex-col gap-3 px-6"
4+
class="experimental-styles-within relative mx-auto mb-4 flex w-full min-w-0 max-w-[1280px] flex-col gap-3 px-6"
55
>
66
<ServerNotice
77
v-for="notice in filteredNotices"

packages/ui/src/components/base/ServerNotice.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
</template>
1919
</template>
2020
<template #actions>
21-
<ButtonStyled v-if="dismissable" circular>
21+
<ButtonStyled v-if="dismissable" :color="NOTICE_TYPE_BTN[level]">
2222
<button
2323
v-tooltip="formatMessage(messages.dismiss)"
2424
@click="() => (preview ? {} : emit('dismiss'))"
2525
>
26-
<XIcon />
26+
<XIcon /> Dismiss
2727
</button>
2828
</ButtonStyled>
2929
</template>
@@ -91,6 +91,12 @@ const NOTICE_TYPE: Record<string, 'info' | 'warning' | 'critical'> = {
9191
critical: 'critical',
9292
}
9393
94+
const NOTICE_TYPE_BTN: Record<string, 'blue' | 'orange' | 'red'> = {
95+
info: 'blue',
96+
warn: 'orange',
97+
critical: 'red',
98+
}
99+
94100
const heading = computed(() => NOTICE_HEADINGS[props.level] ?? messages.info)
95101
</script>
96102
<style scoped lang="scss">

0 commit comments

Comments
 (0)