mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor
This commit is contained in:
parent
37b65d8b47
commit
a0bdbee874
4 changed files with 4 additions and 254 deletions
|
@ -1,26 +1,5 @@
|
|||
<script>
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
import { useStyle } from 'primevue/usestyle';
|
||||
|
||||
const styles = `
|
||||
.p-checkbox {
|
||||
display: inline-flex;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
vertical-align: bottom;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-checkbox.p-checkbox-disabled {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.p-checkbox-box {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
`;
|
||||
|
||||
const classes = {
|
||||
root: ({ instance, props }) => [
|
||||
|
@ -42,8 +21,6 @@ const classes = {
|
|||
icon: 'p-checkbox-icon'
|
||||
};
|
||||
|
||||
const { load: loadStyle } = useStyle(styles, { name: 'checkbox', manual: true });
|
||||
|
||||
export default {
|
||||
name: 'BaseCheckbox',
|
||||
extends: BaseComponent,
|
||||
|
@ -105,8 +82,7 @@ export default {
|
|||
}
|
||||
},
|
||||
css: {
|
||||
classes,
|
||||
loadStyle
|
||||
classes
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue