2023-05-19 12:19:16 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
|
|
|
import { useStyle } from 'primevue/usestyle';
|
|
|
|
|
|
|
|
const styles = `
|
2023-09-25 19:11:55 +00:00
|
|
|
@layer primevue {
|
|
|
|
.p-toolbar {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-toolbar-group-start,
|
|
|
|
.p-toolbar-group-center,
|
|
|
|
.p-toolbar-group-end {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-toolbar-group-left,
|
|
|
|
.p-toolbar-group-right {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2023-05-19 12:19:16 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
root: 'p-toolbar p-component',
|
|
|
|
start: 'p-toolbar-group-start p-toolbar-group-left',
|
|
|
|
center: 'p-toolbar-group-center',
|
|
|
|
end: 'p-toolbar-group-end p-toolbar-group-right'
|
|
|
|
};
|
|
|
|
|
2023-09-20 18:25:10 +00:00
|
|
|
const { load: loadStyle } = useStyle(styles, { name: 'toolbar', manual: true });
|
2023-05-19 12:19:16 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BaseToolbar',
|
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
'aria-labelledby': {
|
|
|
|
type: String,
|
|
|
|
default: null
|
|
|
|
}
|
|
|
|
},
|
|
|
|
css: {
|
2023-06-02 14:28:59 +00:00
|
|
|
classes,
|
|
|
|
loadStyle
|
2023-05-19 12:19:16 +00:00
|
|
|
},
|
2023-06-02 14:28:59 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
$parentInstance: this
|
|
|
|
};
|
2023-05-19 12:19:16 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|