mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +00:00
Fixed #4530 - Export styles of all components
This commit is contained in:
parent
7b6d458067
commit
dc2913e887
463 changed files with 10696 additions and 9670 deletions
|
@ -1,64 +1,6 @@
|
|||
<script>
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
import { useStyle } from 'primevue/usestyle';
|
||||
|
||||
const styles = `
|
||||
@layer primevue {
|
||||
.p-menu ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.p-menu .p-menuitem-link {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-menu .p-menuitem-text {
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const classes = {
|
||||
root: ({ instance, props }) => [
|
||||
'p-menu p-component',
|
||||
{
|
||||
'p-menu-overlay': props.popup,
|
||||
'p-input-filled': instance.$primevue.config.inputStyle === 'filled',
|
||||
'p-ripple-disabled': instance.$primevue.config.ripple === false
|
||||
}
|
||||
],
|
||||
start: 'p-menu-start',
|
||||
menu: 'p-menu-list p-reset',
|
||||
submenuHeader: 'p-submenu-header',
|
||||
separator: 'p-menuitem-separator',
|
||||
end: 'p-menu-end',
|
||||
menuitem: ({ instance }) => [
|
||||
'p-menuitem',
|
||||
{
|
||||
'p-focus': instance.id === instance.focusedOptionId,
|
||||
'p-disabled': instance.disabled()
|
||||
}
|
||||
],
|
||||
content: 'p-menuitem-content',
|
||||
action: ({ props, isActive, isExactActive }) => [
|
||||
'p-menuitem-link',
|
||||
{
|
||||
'router-link-active': isActive,
|
||||
'router-link-active-exact': props.exact && isExactActive
|
||||
}
|
||||
],
|
||||
icon: 'p-menuitem-icon',
|
||||
label: 'p-menuitem-text'
|
||||
};
|
||||
|
||||
const { load: loadStyle } = useStyle(styles, { name: 'menu', manual: true });
|
||||
import MenuStyle from 'primevue/menu/style';
|
||||
|
||||
export default {
|
||||
name: 'BaseMenu',
|
||||
|
@ -101,10 +43,7 @@ export default {
|
|||
default: null
|
||||
}
|
||||
},
|
||||
css: {
|
||||
classes,
|
||||
loadStyle
|
||||
},
|
||||
style: MenuStyle,
|
||||
provide() {
|
||||
return {
|
||||
$parentInstance: this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue