Is there a simple way to set dialog width?
symonsoft opened this issue · 3 comments
symonsoft commented
Something like:
Vue.use(VuejsDialog, {
dialogWidth: "300px"
})
Godofbrowser commented
@symonsoft I wouldn't recommend setting a fixed width, but you can do that with css.
I would recommend you set max-width instead... you can add this to the head tag.
.dg-main-content {
max-width: 300px;
}
If you want to set custom width for a specific instance, you can use the custom class option like so:
let options = {
customClass: 'my-small-width-class' // Custom class to be injected into the parent node for the current dialog instance
};
this.$dialog.confirm('yes or no?', options)
Then your css becomes:
.my-small-width-class .dg-main-content {
max-width: 300px;
}
symonsoft commented
Will it work?
Vue.use(VuejsDialog, {
customClass: 'my-small-width-class'
})
Godofbrowser commented
Yeah, that should work too 👍