Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use large border-radius in Action Button #2713

Merged
merged 4 commits into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
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: var(--border-radius-large);
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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary, so we can only style popovers from Actions.

@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: 14px;
}
</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: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs some documentation.

type: String,
default: '',
}
},

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