2023-05-19 12:19:16 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
|
|
|
import { useStyle } from 'primevue/usestyle';
|
|
|
|
|
|
|
|
const styles = `
|
|
|
|
.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;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
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-07-03 22:20:35 +00:00
|
|
|
const { load: loadStyle, unload: unloadStyle } = 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>
|