From 49917702a6aa8786e42a5171d6d4ec5525fe028c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Go=CC=88khan=20O=CC=88ztu=CC=88rk?= Date: Fri, 23 Sep 2022 16:27:04 +0300 Subject: [PATCH] feat: adds new properties --- src/components/Badge/Badge.stories.mdx | 6 ++++++ src/components/Badge/Badge.vue | 15 +++++++++++++-- src/components/Badge/badge.css | 20 ++++++++++++++------ 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/components/Badge/Badge.stories.mdx b/src/components/Badge/Badge.stories.mdx index fa8d3be..163e1c8 100644 --- a/src/components/Badge/Badge.stories.mdx +++ b/src/components/Badge/Badge.stories.mdx @@ -60,6 +60,12 @@ export const defaultArgs = { }, defaultValue: '', }, + bordered: { + control: { + type: 'boolean', + }, + defaultValue: false, + }, onClick: { action: 'click', }, diff --git a/src/components/Badge/Badge.vue b/src/components/Badge/Badge.vue index 8f9a7cd..987c98f 100644 --- a/src/components/Badge/Badge.vue +++ b/src/components/Badge/Badge.vue @@ -13,6 +13,8 @@ export interface BadgeProps { hover?: boolean; icon?: string; content?: string | number; + bordered?: boolean; + over?: boolean; } const props = withDefaults(defineProps(), { placement: 'right', @@ -24,6 +26,8 @@ const props = withDefaults(defineProps(), { hover: false, icon: '', content: '', + bordered: false, + over: false, }); const emit = defineEmits(['click']); const classes = computed(() => { @@ -37,6 +41,8 @@ const classes = computed(() => { 'badge--overlap': props.overlap, 'badge--square': props.square, 'badge--hover': props.hover, + 'badge--bordered': props.bordered, + 'badge--over': props.over, }; }); const styles = computed(() => { @@ -55,8 +61,13 @@ const iconSize = computed(() => { const onClick = () => emit('click');