Skip to content

Commit

Permalink
Refactor #5437 - For Dock
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Mar 18, 2024
1 parent d5c372e commit 6ef3c46
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 55 deletions.
2 changes: 1 addition & 1 deletion components/lib/dock/DockSub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<template v-for="(processedItem, index) of model" :key="index">
<li
:id="getItemId(index)"
:class="cx('menuitem', { processedItem, index, id: getItemId(index) })"
:class="cx('menuitem', { processedItem, id: getItemId(index) })"
role="menuitem"
:aria-label="processedItem.label"
:aria-disabled="disabled(processedItem)"
Expand Down
9 changes: 2 additions & 7 deletions components/lib/dock/style/DockStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@ const classes = {
],
container: 'p-dock-list-container',
menu: 'p-dock-list',
menuitem: ({ instance, processedItem, index, id }) => [
menuitem: ({ instance, processedItem, id }) => [
'p-dock-item',
{
'p-focus': instance.isItemActive(id),
'p-disabled': instance.disabled(processedItem),
'p-dock-item-second-prev': instance.currentIndex - 2 === index,
'p-dock-item-prev': instance.currentIndex - 1 === index,
'p-dock-item-current': instance.currentIndex === index,
'p-dock-item-next': instance.currentIndex + 1 === index,
'p-dock-item-second-next': instance.currentIndex + 2 === index
'p-disabled': instance.disabled(processedItem)
}
],
content: 'p-menuitem-content',
Expand Down
47 changes: 0 additions & 47 deletions components/lib/themes/primeone/base/dock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,6 @@ p-dock-item.p-focus {
height: 3rem;
}
.p-dock-item-second-prev,
.p-dock-item-second-next {
transform: scale(1.2);
}
.p-dock-item-prev,
.p-dock-item-next {
transform: scale(1.4);
}
.p-dock-item-current {
transform: scale(1.6);
z-index: 1;
}
.p-dock-top {
left: 0;
top: 0;
Expand Down Expand Up @@ -115,38 +100,6 @@ p-dock-item.p-focus {
flex-direction: column;
}
.p-dock-top .p-dock-item-second-prev,
.p-dock-top .p-dock-item-second-next,
.p-dock-bottom .p-dock-item-second-prev,
.p-dock-bottom .p-dock-item-second-next {
margin: 0 0.9rem;
}
.p-dock-top .p-dock-item-prev,
.p-dock-top .p-dock-item-next,
.p-dock-bottom .p-dock-item-prev,
.p-dock-bottom .p-dock-item-next {
margin: 0 1.3rem;
}
.p-dock-top .p-dock-item-current,
.p-dock-bottom .p-dock-item-current {
margin: 0 1.5rem;
}
.p-dock-left .p-dock-item-second-prev,
.p-dock-left .p-dock-item-second-next,
.p-dock-right .p-dock-item-second-prev,
.p-dock-right .p-dock-item-second-next {
margin: 0.9rem 0;
}
.p-dock-left .p-dock-item-prev,
.p-dock-left .p-dock-item-next,
.p-dock-right .p-dock-item-prev,
.p-dock-right .p-dock-item-next {
margin: 1.3rem 0;
}
.p-dock-left .p-dock-item-current,
.p-dock-right .p-dock-item-current {
margin: 1.5rem 0;
}
.p-dock-mobile.p-dock-top .p-dock-list-container,
.p-dock-mobile.p-dock-bottom .p-dock-list-container {
overflow-x: auto;
Expand Down

0 comments on commit 6ef3c46

Please sign in to comment.