| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <!--
- System bars
- -->
- <template>
- <v-system-bar
- height="50"
- :class="'d-flex flex-row justify-center align-center text-center ' + classes"
- @click="onClick !== undefined ? onClick() : null"
- >
- <slot>
- <v-icon v-if="icon" small :icon="icon" />
- {{ text }}
- </slot>
- </v-system-bar>
- </template>
- <script setup lang="ts">
- const props = defineProps({
- text: {
- type: String,
- required: false,
- default: ''
- },
- icon: {
- type: String,
- required: false,
- default: undefined
- },
- backgroundColor: {
- type: String,
- required: false,
- default: '#eeeeee'
- },
- textColor: {
- type: String,
- required: false,
- default: '#5f5f5f'
- },
- onClick: {
- type: Function,
- required: false,
- default: undefined
- },
- })
- // TODO: voir si possible d'utiliser les variables sass à la place?
- const classes = [
- 'bg-' + props.backgroundColor,
- 'text-' + props.textColor,
- (props.onClick !== undefined ? 'clickable' : '')
- ].join(' ')
- </script>
- <style scoped lang="scss">
- .v-system-bar {
- font-size: 14px;
- }
- .v-icon {
- height: 20px;
- margin: 0 6px;
- }
- .clickable {
- cursor: pointer;
- }
- .clickable:hover {
- text-decoration: underline;
- }
- </style>
|