Refactored breadcrumb
parent
543b563388
commit
7b0c4450a7
|
@ -3,12 +3,12 @@ import BaseStyle from 'primevue/base/style';
|
||||||
const classes = {
|
const classes = {
|
||||||
root: 'p-breadcrumb p-component',
|
root: 'p-breadcrumb p-component',
|
||||||
menu: 'p-breadcrumb-list',
|
menu: 'p-breadcrumb-list',
|
||||||
home: 'p-breadcrumb-home',
|
home: 'p-breadcrumb-home-item',
|
||||||
separator: 'p-menuitem-separator',
|
separator: 'p-breadcrumb-separator',
|
||||||
menuitem: ({ instance }) => ['p-menuitem', { 'p-disabled': instance.disabled() }],
|
menuitem: ({ instance }) => ['p-breadcrumb-item', { 'p-disabled': instance.disabled() }],
|
||||||
action: 'p-menuitem-link',
|
action: 'p-breadcrumb-action',
|
||||||
icon: 'p-menuitem-icon',
|
icon: 'p-breadcrumb-icon',
|
||||||
label: 'p-menuitem-text'
|
label: 'p-breadcrumb-label'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default BaseStyle.extend({
|
export default BaseStyle.extend({
|
||||||
|
|
|
@ -8,7 +8,7 @@ export default {
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-breadcrumb .p-breadcrumb-list {
|
.p-breadcrumb-list {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
@ -17,50 +17,44 @@ export default {
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-breadcrumb .p-menuitem-link {
|
.p-breadcrumb-separator {
|
||||||
text-decoration: none;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.p-breadcrumb .p-menuitem-separator {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin: 0 0.5rem 0 0.5rem;
|
||||||
|
color: ${dt('breadcrumb.separator.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-breadcrumb::-webkit-scrollbar {
|
.p-breadcrumb::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-breadcrumb .p-menuitem-link {
|
.p-breadcrumb-action {
|
||||||
|
text-decoration: none;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
||||||
border-radius: ${dt('rounded.base')};
|
border-radius: ${dt('rounded.base')};
|
||||||
outline-color: transparent;
|
outline-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-breadcrumb .p-menuitem-link:focus-visible {
|
.p-breadcrumb-action:focus-visible {
|
||||||
outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')};
|
outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')};
|
||||||
outline-offset: ${dt('focus.ring.offset')};
|
outline-offset: ${dt('focus.ring.offset')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-breadcrumb .p-menuitem-text {
|
.p-breadcrumb-label {
|
||||||
color: ${dt('breadcrumb.item.color')};
|
color: ${dt('breadcrumb.item.color')};
|
||||||
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-breadcrumb .p-menuitem-text:hover {
|
.p-breadcrumb-label:hover {
|
||||||
color: ${dt('breadcrumb.item.hover.color')};
|
color: ${dt('breadcrumb.item.hover.color')};
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-breadcrumb .p-menuitem-icon {
|
.p-breadcrumb-icon {
|
||||||
color: ${dt('breadcrumb.item.icon.color')};
|
color: ${dt('breadcrumb.item.icon.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-breadcrumb .p-breadcrumb-list li.p-menuitem-separator {
|
|
||||||
margin: 0 0.5rem 0 0.5rem;
|
|
||||||
color: ${dt('breadcrumb.separator.color')};
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue