ColumnWrapper.vue
2 years ago
CxVuiCollapseMini.vue
2 years ago
CxVuiDate.vue
2 years ago
CxVuiFSelect.vue
2 years ago
CxVuiPopup.vue
2 years ago
CxVuiSelect.vue
2 years ago
CxVuiTabs.vue
2 years ago
CxVuiTabsPanel.vue
2 years ago
Delimiter.vue
2 years ago
DetailsTable.vue
2 years ago
DetailsTableRow.vue
2 years ago
DetailsTableRowValue.vue
2 years ago
ExternalLink.vue
2 years ago
ListComponents.vue
2 years ago
PrintButton.vue
2 years ago
RowWrapper.vue
2 years ago
Tooltip.vue
2 years ago
ColumnWrapper.vue
84 lines
| 1 | <template> |
| 2 | <div :class="className"> |
| 3 | <label |
| 4 | class="cx-vui-component__label" |
| 5 | v-if="$slots.label" |
| 6 | :for="elementIdData" |
| 7 | > |
| 8 | <slot name="label"></slot> |
| 9 | </label> |
| 10 | <slot></slot> |
| 11 | <div |
| 12 | class="cx-vui-component__desc" |
| 13 | v-if="$slots.description" |
| 14 | > |
| 15 | <slot name="description"></slot> |
| 16 | </div> |
| 17 | </div> |
| 18 | </template> |
| 19 | |
| 20 | <script> |
| 21 | |
| 22 | export default { |
| 23 | name: 'ColumnWrapper', |
| 24 | props: { |
| 25 | elementId: { |
| 26 | type: String, |
| 27 | required: true, |
| 28 | }, |
| 29 | /** |
| 30 | * Possible values: |
| 31 | * 'padding-top-bottom-unset': true, |
| 32 | * 'padding-unset': true, |
| 33 | * 'padding-side-unset: true, |
| 34 | */ |
| 35 | classNames: { |
| 36 | type: Object, |
| 37 | default: () => ( |
| 38 | {} |
| 39 | ), |
| 40 | }, |
| 41 | }, |
| 42 | data() { |
| 43 | return { |
| 44 | elementIdData: `cx_${ this.elementId }`, |
| 45 | }; |
| 46 | }, |
| 47 | computed: { |
| 48 | className() { |
| 49 | return { |
| 50 | 'cx-vui-component': true, |
| 51 | ...this.classNames, |
| 52 | }; |
| 53 | }, |
| 54 | }, |
| 55 | provide() { |
| 56 | return { |
| 57 | elementId: this.elementIdData, |
| 58 | }; |
| 59 | }, |
| 60 | }; |
| 61 | </script> |
| 62 | |
| 63 | <style lang="scss" scoped> |
| 64 | .cx-vui-component { |
| 65 | flex-direction: column; |
| 66 | width: 100%; |
| 67 | border-top: unset; |
| 68 | gap: 0.7em; |
| 69 | |
| 70 | &.padding-side-unset { |
| 71 | padding-left: unset; |
| 72 | padding-right: unset; |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | .padding-top-bottom-unset { |
| 77 | padding-top: unset; |
| 78 | padding-bottom: unset; |
| 79 | } |
| 80 | |
| 81 | .padding-unset { |
| 82 | padding: unset; |
| 83 | } |
| 84 | </style> |