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

Commit

Permalink
Add rounded property for tags (#2284)
Browse files Browse the repository at this point in the history
* Add rounded property for tags

* add changelog

* Fix linting

* Add property description
  • Loading branch information
lookacat authored Aug 4, 2022
1 parent f3700f9 commit 6e655d1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
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: {
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

0 comments on commit 6e655d1

Please sign in to comment.