-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI-475: Extracted Note style component (#412)
- Loading branch information
Showing
5 changed files
with
56 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,16 @@ | ||
<script setup lang="ts"> | ||
import 'uno.css'; | ||
import '../assets/main.css'; | ||
import { Alert } from '~/components'; | ||
import type { AlertType } from '~/types'; | ||
interface AlertProps { | ||
title: string | ||
description: string | ||
type: AlertType | ||
} | ||
const alerts: AlertProps[] = [ | ||
{ | ||
title: 'Info', | ||
description: 'Click here to learn more about the exciting enhancements we\'ve made.', | ||
type: 'info', | ||
}, | ||
{ | ||
title: 'Success', | ||
description: 'Your profile information has been successfully updated.', | ||
type: 'success', | ||
}, | ||
{ | ||
title: 'Warning', | ||
description: 'Please check your internet connection.', | ||
type: 'warning', | ||
}, | ||
{ | ||
title: 'Error', | ||
description: 'Unable to save data, check again later.', | ||
type: 'error', | ||
}, | ||
]; | ||
import { Note } from '~/components'; | ||
</script> | ||
|
||
<template> | ||
<div class="container"> | ||
<Alert v-for="alert in alerts" :key="alert.type" :type="alert.type"> | ||
<template #title> | ||
{{ alert.title }} | ||
</template> | ||
<template #description> | ||
{{ alert.description }} | ||
</template> | ||
</Alert> | ||
</div> | ||
<Note> | ||
<template #icon> | ||
📪 | ||
</template> | ||
<template #content> | ||
<p>Don't forget to check your inbox, we have sent a link to verify your account.</p> | ||
</template> | ||
</Note> | ||
</template> | ||
|
||
<style scoped> | ||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
width: 100vw; | ||
height: 100vh; | ||
gap: 40px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.note { | ||
display: flex; | ||
box-sizing: border-box; | ||
align-items: center; | ||
width: max-content; | ||
max-width: 100%; | ||
padding: 2px 25px; | ||
border: 1px solid var(--gray-100); | ||
border-radius: 8px; | ||
background: var(--base-white); | ||
gap: 32px; | ||
} | ||
.note__icon { | ||
color: var(--brand-500); | ||
} | ||
.note__content { | ||
color: var(--gray-700); | ||
font: var(--text-sm-regular); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.note { | ||
display: flex; | ||
box-sizing: border-box; | ||
align-items: center; | ||
width: max-content; | ||
max-width: 100%; | ||
padding: 2px 25px; | ||
border: 1px solid var(--gray-100); | ||
border-radius: 8px; | ||
background: var(--base-white); | ||
gap: 32px; | ||
|
||
&__icon { | ||
color: var(--brand-500); | ||
} | ||
|
||
&__content { | ||
color: var(--gray-700); | ||
font: var(--text-sm-regular); | ||
} | ||
} |