primevue-mirror/components/lib/splitbutton/style/SplitButtonStyle.js

71 lines
1.5 KiB
JavaScript
Raw Normal View History

import BaseStyle from 'primevue/base/style';
const theme = ({ dt }) => `
.p-splitbutton {
display: inline-flex;
position: relative;
2024-05-09 09:13:03 +00:00
border-radius: ${dt('splitbutton.border.radius')};
}
.p-splitbutton-button {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right: 0 none;
}
2024-05-09 09:13:03 +00:00
.p-splitbutton-button:focus-visible,
.p-splitbutton-dropdown:focus-visible {
z-index: 1;
}
.p-splitbutton-button:not(:disabled):hover,
.p-splitbutton-button:not(:disabled):active {
border-right: 0 none;
}
.p-splitbutton-dropdown {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.p-splitbutton .p-menu {
min-width: 100%;
}
.p-fluid .p-splitbutton {
display: flex;
}
2024-05-09 09:13:03 +00:00
.p-splitbutton-rounded .p-splitbutton-dropdown {
border-top-right-radius: ${dt('splitbutton.rounded.border.radius')};
border-bottom-right-radius: ${dt('splitbutton.rounded.border.radius')};
}
2024-05-09 09:13:03 +00:00
.p-splitbutton-rounded .p-splitbutton-button {
border-top-left-radius: ${dt('splitbutton.rounded.border.radius')};
border-bottom-left-radius: ${dt('splitbutton.rounded.border.radius')};
}
2024-05-09 09:13:03 +00:00
.p-splitbutton-raised {
box-shadow: ${dt('splitbutton.raised.shadow')};
}
`;
const classes = {
2024-05-09 09:13:03 +00:00
root: ({ props }) => [
'p-splitbutton p-component',
{
'p-splitbutton-raised': props.raised,
'p-splitbutton-rounded': props.rounded
}
],
2024-05-06 15:23:01 +00:00
pcButton: 'p-splitbutton-button',
pcDropdown: 'p-splitbutton-dropdown'
};
export default BaseStyle.extend({
name: 'splitbutton',
theme,
classes
});