mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +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,53 +1,6 @@
|
|||
<script>
|
||||
import AccordionStyle from 'primevue/accordion/style';
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
import { useStyle } from 'primevue/usestyle';
|
||||
|
||||
const styles = `
|
||||
@layer primevue {
|
||||
.p-accordion-header-action {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
position: relative;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.p-accordion-header-action:focus {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.p-accordion-header-text {
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const classes = {
|
||||
root: 'p-accordion p-component',
|
||||
tab: {
|
||||
root: ({ instance, index }) => [
|
||||
'p-accordion-tab',
|
||||
{
|
||||
'p-accordion-tab-active': instance.isTabActive(index)
|
||||
}
|
||||
],
|
||||
header: ({ instance, tab, index }) => [
|
||||
'p-accordion-header',
|
||||
{
|
||||
'p-highlight': instance.isTabActive(index),
|
||||
'p-disabled': instance.getTabProp(tab, 'disabled')
|
||||
}
|
||||
],
|
||||
headerAction: 'p-accordion-header-link p-accordion-header-action',
|
||||
headerIcon: 'p-accordion-toggle-icon',
|
||||
headerTitle: 'p-accordion-header-text',
|
||||
toggleableContent: 'p-toggleable-content',
|
||||
content: 'p-accordion-content'
|
||||
}
|
||||
};
|
||||
|
||||
const { load: loadStyle } = useStyle(styles, { name: 'accordion', manual: true });
|
||||
|
||||
export default {
|
||||
name: 'BaseAccordion',
|
||||
|
@ -82,10 +35,7 @@ export default {
|
|||
default: false
|
||||
}
|
||||
},
|
||||
css: {
|
||||
classes,
|
||||
loadStyle
|
||||
},
|
||||
style: AccordionStyle,
|
||||
provide() {
|
||||
return {
|
||||
$parentInstance: this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue