mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
Refactor #5071 - Improve the structure of some components to comply with standards
This commit is contained in:
parent
e7d3074af2
commit
99b1edd5ce
17 changed files with 355 additions and 355 deletions
|
@ -1,26 +1,41 @@
|
|||
import BaseStyle from 'primevue/base/style';
|
||||
|
||||
const css = `
|
||||
@layer primevue {
|
||||
.p-checkbox {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
user-select: none;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.p-checkbox-input {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.p-checkbox-box {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const classes = {
|
||||
root: ({ instance, props }) => [
|
||||
'p-checkbox p-component',
|
||||
{
|
||||
'p-checkbox-checked': instance.checked,
|
||||
'p-checkbox-disabled': props.disabled,
|
||||
'p-checkbox-focused': instance.focused
|
||||
}
|
||||
],
|
||||
input: ({ instance, props }) => [
|
||||
'p-checkbox-box',
|
||||
{
|
||||
'p-highlight': instance.checked,
|
||||
'p-disabled': props.disabled,
|
||||
'p-focus': instance.focused
|
||||
'p-disabled': props.disabled
|
||||
}
|
||||
],
|
||||
box: 'p-checkbox-box',
|
||||
input: 'p-checkbox-input',
|
||||
icon: 'p-checkbox-icon'
|
||||
};
|
||||
|
||||
export default BaseStyle.extend({
|
||||
name: 'checkbox',
|
||||
css,
|
||||
classes
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue