diff --git a/docs/examples/test.vue b/docs/examples/test.vue index 3603b40..02787b4 100644 --- a/docs/examples/test.vue +++ b/docs/examples/test.vue @@ -1,5 +1,26 @@ + + + diff --git a/src/components/slds-button-group/slds-button-group.vue b/src/components/slds-button-group/slds-button-group.vue index edf9485..c03ec41 100644 --- a/src/components/slds-button-group/slds-button-group.vue +++ b/src/components/slds-button-group/slds-button-group.vue @@ -1,13 +1,119 @@ + diff --git a/src/components/slds-modal/slds-modal.vue b/src/components/slds-modal/slds-modal.vue index b2e32d2..8452f54 100644 --- a/src/components/slds-modal/slds-modal.vue +++ b/src/components/slds-modal/slds-modal.vue @@ -8,7 +8,7 @@ -
+
@@ -84,10 +84,18 @@ export default defineComponent({ computed: { /** - * Transition name, if any. + * Bindable modal attributes. */ - transitionName(): string { - return this.noAnimation ? "" : "blow-up" + modalAttributes(): Record { + const attributes: Record = {} + + for (const attribute in this.$attrs) { + if (attribute.startsWith("data-") || attribute === "class") { + attributes[attribute] = this.$attrs[attribute] + } + } + + return attributes }, /** @@ -139,6 +147,13 @@ export default defineComponent({ return classNames }, + + /** + * Transition name, if any. + */ + transitionName(): string { + return this.noAnimation ? "" : "blow-up" + }, }, mounted() {