Skip to content

Commit

Permalink
Merge pull request #2713 from nextcloud/enhanc/action-button-border-r…
Browse files Browse the repository at this point in the history
…adius

Use large border-radius in Action Button
  • Loading branch information
GretaD authored May 31, 2022
2 parents 3d6b4eb + f756ce6 commit f5e01f1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/assets/action.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
li {
&.active {
background-color: var(--color-background-hover);
border-radius: 6px;
padding: 0;
}
}
}
Expand Down
13 changes: 13 additions & 0 deletions src/components/Actions/Actions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export default {
:placement="placement"
:boundaries-element="boundariesElement"
:container="container"
popover-base-class="action-item__popover"
@show="openMenu"
@after-show="onOpen"
@hide="closeMenu">
Expand Down Expand Up @@ -781,6 +782,10 @@ export default {
}
}

.popover__inner ul {
padding: 4px;
}

.ie,
.edge {
.action-item__menu,
Expand All @@ -790,3 +795,11 @@ export default {
}

</style>

<style lang="scss">
// We overwrote the popover base class, so we can style
// the popover__inner for actions only.
.popover.action-item__popover .popover__inner {
border-radius: var(--border-radius-large);
}
</style>
9 changes: 8 additions & 1 deletion src/components/Popover/Popover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ With a `<button>` as a trigger:
<template>
<VPopover ref="popover"
v-bind="$attrs"
popover-base-class="popover"
:popover-base-class="`popover ${popoverBaseClass}`"
popover-wrapper-class="popover__wrapper"
popover-arrow-class="popover__arrow"
popover-inner-class="popover__inner"
Expand All @@ -77,6 +77,13 @@ export default {
VPopover,
},

props: {
popoverBaseClass: {
type: String,
default: '',
}
},

mounted() {
this.$watch(
() => {
Expand Down

0 comments on commit f5e01f1

Please sign in to comment.