Skip to content

Commit

Permalink
Update tokens of Popover
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed May 9, 2024
1 parent 97a1d8e commit e7853c5
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 18 deletions.
20 changes: 10 additions & 10 deletions components/lib/popover/style/PopoverStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ import BaseStyle from 'primevue/base/style';

const theme = ({ dt }) => `
.p-popover {
margin-top: 10px;
margin-top: ${dt('popover.gutter')};
background: ${dt('popover.background')};
color: ${dt('popover.color')};
border: 1px solid ${dt('popover.border.color')};
border-radius: ${dt('border.radius.md')};
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
border-radius: ${dt('popover.border.radius')};
box-shadow: ${dt('popover.shadow')};
}
.p-popover-content {
padding: 0.75rem;
padding: ${dt('popover.content.padding')};
}
.p-popover-flipped {
margin-top: 0;
margin-bottom: 10px;
margin-bottom: ${dt('popover.gutter')};
}
.p-popover-enter-from {
Expand All @@ -39,7 +39,7 @@ const theme = ({ dt }) => `
.p-popover:after,
.p-popover:before {
bottom: 100%;
left: ${dt('{overlay.arrow.left} + 1.25rem', 0)};
left: ${dt('popover.arrow.offset')};
content: " ";
height: 0;
width: 0;
Expand All @@ -48,16 +48,16 @@ const theme = ({ dt }) => `
}
.p-popover:after {
border-width: 8px;
margin-left: -8px;
border-width: calc(${dt('popover.gutter')} - 2px);
margin-left: calc(-1 * (${dt('popover.gutter')} - 2px));
border-style: solid;
border-color: transparent;
border-bottom-color: ${dt('popover.background')};
}
.p-popover:before {
border-width: 10px;
margin-left: -10px;
border-width: ${dt('popover.gutter')};
margin-left: calc(-1 * ${dt('popover.gutter')});
border-style: solid;
border-color: transparent;
border-bottom-color: ${dt('popover.border.color')};
Expand Down
15 changes: 11 additions & 4 deletions components/lib/themes/aura/popover/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
export default {
root: {
background: '{content.background}',
borderColor: '{content.border.color}',
color: '{content.color}'
}
background: '{overlay.popover.background}',
borderColor: '{overlay.popover.border.color}',
color: '{overlay.popover.color}',
borderRadius: '{overlay.popover.border.radius}',
shadow: '{overlay.popover.shadow}',
gutter: '10px'
},
content: {
padding: '{overlay.popover.padding}'
},
arrowOffset: '1.25rem'
};
15 changes: 11 additions & 4 deletions components/lib/themes/lara/popover/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
export default {
root: {
background: '{content.background}',
borderColor: '{content.border.color}',
color: '{content.color}'
}
background: '{overlay.popover.background}',
borderColor: '{overlay.popover.border.color}',
color: '{overlay.popover.color}',
borderRadius: '{overlay.popover.border.radius}',
shadow: '{overlay.popover.shadow}',
gutter: '10px'
},
content: {
padding: '{overlay.popover.padding}'
},
arrowOffset: '1.25rem'
};

0 comments on commit e7853c5

Please sign in to comment.