-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from CSCfi/tag-border-radius
fix: c-tag - expose the tag border radius as a css variable
- Loading branch information
Showing
5 changed files
with
49 additions
and
24 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
packages/csc-ui-documentation/components/examples/c-tags/Badge.vue
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,29 @@ | ||
<template> | ||
<component-example name="badge"> | ||
<template #title>Usage with badges</template> | ||
|
||
<c-tags> | ||
<c-tag :active="activeTags[0]" badge="0" @click="onToggleActive(0)"> | ||
One | ||
</c-tag> | ||
|
||
<c-tag :active="activeTags[1]" badge="125" @click="onToggleActive(1)"> | ||
Two | ||
</c-tag> | ||
|
||
<c-tag :active="activeTags[2]" badge="9" @click="onToggleActive(2)"> | ||
Three | ||
</c-tag> | ||
</c-tags> | ||
</component-example> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
const activeTags = ref([false, true, false]); | ||
const onToggleActive = (index: number) => { | ||
activeTags.value[index] = !activeTags.value[index]; | ||
}; | ||
</script> |
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
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