mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 01:12:37 +00:00
Refactor #5071
This commit is contained in:
parent
7107b529aa
commit
631fd839ca
3 changed files with 20 additions and 26 deletions
|
@ -3,49 +3,37 @@ import BaseStyle from 'primevue/base/style';
|
|||
const css = `
|
||||
@layer primevue {
|
||||
.p-togglebutton {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
user-select: none;
|
||||
align-items: center;
|
||||
vertical-align: bottom;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-togglebutton-input {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.p-button-label {
|
||||
.p-togglebutton .p-button {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.p-button-icon-right {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.p-button-icon-only {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.p-button-icon-only .p-button-label {
|
||||
visibility: hidden;
|
||||
width: 0;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const classes = {
|
||||
root: ({ instance, props }) => [
|
||||
'p-togglebutton p-button p-component',
|
||||
'p-togglebutton p-component',
|
||||
{
|
||||
'p-button-icon-only': instance.hasIcon && !instance.hasLabel,
|
||||
'p-disabled': props.disabled,
|
||||
'p-highlight': instance.active
|
||||
}
|
||||
],
|
||||
input: 'p-togglebutton-input',
|
||||
box: ({ instance }) => [
|
||||
'p-button p-component',
|
||||
{
|
||||
'p-button-icon-only': instance.hasIcon && !instance.hasLabel
|
||||
}
|
||||
],
|
||||
icon: ({ instance, props }) => [
|
||||
'p-button-icon',
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue