Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Add rounded property for tags #2284

Merged
merged 4 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/unreleased/enhancement-add-rounded-oc-tag
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Add rounded prop to OcTag

We've added a rounded property to the OcTag component

https://github.com/owncloud/owncloud-design-system/pull/2284
19 changes: 19 additions & 0 deletions src/components/atoms/OcTag/OcTag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ export default {
return value.match(/(small|medium|large)/)
},
},

/**
* Enables fully rounded borders
*/
rounded: {
lookacat marked this conversation as resolved.
Show resolved Hide resolved
type: Boolean,
default: false,
required: false,
},
},

computed: {
Expand All @@ -55,6 +64,10 @@ export default {
? classes.push("oc-tag-link")
: classes.push(`oc-tag-${this.type}`)

if (this.rounded) {
classes.push("oc-tag-rounded")
}

return classes
},
},
Expand Down Expand Up @@ -100,6 +113,12 @@ export default {
padding: var(--oc-space-small) var(--oc-space-medium);
}

&-rounded {
border-radius: 99px;
padding-left: var(--oc-space-small);
padding-right: var(--oc-space-small);
}

.oc-icon > svg {
fill: var(--oc-color-text-muted);
}
Expand Down