ameliabooking
/
v3
/
src
/
views
/
public
/
EventForm
/
WpaEventsLandingForm
/
WpaEventsBookButton.vue
WpaEventsBookButton.vue
1 month ago
WpaEventsLandingForm.vue
1 month ago
WpaEventsSelectionSidebar.vue
1 week ago
WpaEventsBookButton.vue
88 lines
| 1 | <template> |
| 2 | <div class="amelia-v2-booking wpa-events__book-button" :style="eventCssVars"> |
| 3 | <div id="amelia-container" class="wpa-events__book-button-inner"> |
| 4 | <AmButton |
| 5 | :type="buttonType" |
| 6 | :category="buttonCategory" |
| 7 | size="small" |
| 8 | class="wpa-events__book-button-btn" |
| 9 | :disabled="bookDisabled" |
| 10 | @click="onPrimaryClick" |
| 11 | > |
| 12 | {{ bookLabel }} |
| 13 | </AmButton> |
| 14 | </div> |
| 15 | </div> |
| 16 | </template> |
| 17 | |
| 18 | <script setup> |
| 19 | import AmButton from '@/views/_components/button/AmButton.vue' |
| 20 | |
| 21 | defineProps({ |
| 22 | eventCssVars: { |
| 23 | type: Object, |
| 24 | default: () => ({}), |
| 25 | }, |
| 26 | eventId: { |
| 27 | type: Number, |
| 28 | default: 0, |
| 29 | }, |
| 30 | bookLabel: { |
| 31 | type: String, |
| 32 | default: '', |
| 33 | }, |
| 34 | bookDisabled: { |
| 35 | type: Boolean, |
| 36 | default: false, |
| 37 | }, |
| 38 | buttonType: { |
| 39 | type: String, |
| 40 | default: 'filled', |
| 41 | }, |
| 42 | buttonCategory: { |
| 43 | type: String, |
| 44 | default: 'primary', |
| 45 | }, |
| 46 | }) |
| 47 | |
| 48 | const emit = defineEmits(['book']) |
| 49 | |
| 50 | function onPrimaryClick() { |
| 51 | emit('book') |
| 52 | } |
| 53 | </script> |
| 54 | |
| 55 | <style lang="scss" scoped> |
| 56 | .wpa-events__book-button { |
| 57 | padding: 16px 24px; |
| 58 | background: var(--am-c-main-bgr); |
| 59 | box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.08); |
| 60 | border-radius: 8px; |
| 61 | font-family: var(--am-font-family); |
| 62 | color: var(--am-c-main-text); |
| 63 | |
| 64 | &-inner { |
| 65 | width: 100%; |
| 66 | max-width: var(--wpa-max, 1048px); |
| 67 | display: flex; |
| 68 | justify-content: flex-end; |
| 69 | align-items: center; |
| 70 | |
| 71 | @media (max-width: 899px) { |
| 72 | justify-content: stretch; |
| 73 | |
| 74 | .wpa-events__book-button-btn, |
| 75 | .wpa-events__book-button-link { |
| 76 | flex: 1 1 auto; |
| 77 | width: 100%; |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | &-link { |
| 83 | text-decoration: none; |
| 84 | box-sizing: border-box; |
| 85 | } |
| 86 | } |
| 87 | </style> |
| 88 |