Adrià Vilanova MartÃnez | 1e10d19 | 2021-12-31 16:01:13 +0100 | [diff] [blame^] | 1 | <script> |
| 2 | import {Corner} from '@material/menu-surface/constants.js'; |
| 3 | |
| 4 | export default { |
| 5 | components: {}, |
| 6 | props: { |
| 7 | modelValue: Boolean, |
| 8 | position: Array, |
| 9 | workflows: Array, |
| 10 | }, |
| 11 | data() { |
| 12 | return { |
| 13 | corner: Corner.TOP_RIGHT, |
| 14 | }; |
| 15 | }, |
| 16 | emits: [ |
| 17 | 'update:modelValue', |
| 18 | 'select', |
| 19 | ], |
| 20 | } |
| 21 | </script> |
| 22 | |
| 23 | <template> |
| 24 | <mcw-menu :model-value="modelValue" fixed :anchor-corner="corner" |
| 25 | :style="{ left: 'unset', right: 'calc(100% - ' + position[0] + 'px)', top: position[1] + 'px' }" |
| 26 | @update:model-value="$emit('update:modelValue', $event)" @select="$emit('select', $event)"> |
| 27 | <mcw-list-item v-for="wf in workflows">{{ wf.name }}</mcw-list-item> |
| 28 | </mcw-menu> |
| 29 | </template> |
| 30 | |
| 31 | <style scoped> |
| 32 | .mdc-list-item { |
| 33 | /* These styles mimic the Community Console style. */ |
| 34 | font-family: 'Google Sans Text', 'Noto', sans-serif; |
| 35 | font-size: 14px; |
| 36 | font-weight: 400; |
| 37 | height: 40px!important; |
| 38 | } |
| 39 | </style> |