Created
July 15, 2023 11:13
-
-
Save suhodolskiy/3e36ec718e4b0b112282e23e869ad40a to your computer and use it in GitHub Desktop.
Export Type
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
<script lang="ts"> | |
export enum BadgeLook { | |
Success = 'success', | |
Warning = 'warning', | |
Danger = 'danger', | |
Info = 'info', | |
} | |
</script> | |
<script lang="ts" setup> | |
import classes from './base-badge.module.css' | |
withDefaults( | |
defineProps<{ | |
look: BadgeLook | |
}>(), | |
{ | |
look: BadgeLook.Info, | |
} | |
) | |
</script> | |
<template> | |
<div :class="[classes.badge, classes[look]]"> | |
<slot /> | |
</div> | |
</template> |
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
import BaseBadge, { BadgeLook } from 'xxxxx' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment