diff --git a/src/components/modal/modal.js b/src/components/modal/modal.js index 792a7deddc5..a21f1f9241e 100644 --- a/src/components/modal/modal.js +++ b/src/components/modal/modal.js @@ -55,35 +55,35 @@ export const props = { }, centered: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'centered') }, scrollable: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'scrollable') }, buttonSize: { - type: String - // default: '' + type: String, + default: () => getComponentConfig(NAME_MODAL, 'buttonSize') }, noStacking: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'noStacking') }, noFade: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'noFade') }, noCloseOnBackdrop: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'noCloseOnBackdrop') }, noCloseOnEsc: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'noCloseOnEsc') }, noEnforceFocus: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'noEnforceFocus') }, ignoreEnforceFocusSelector: { type: [Array, String], @@ -101,8 +101,8 @@ export const props = { default: () => getComponentConfig(NAME_MODAL, 'titleTag') }, titleClass: { - type: [String, Array, Object] - // default: null + type: [String, Array, Object], + default: () => getComponentConfig(NAME_MODAL, 'titleClass') }, titleSrOnly: { type: Boolean, @@ -129,8 +129,8 @@ export const props = { default: () => getComponentConfig(NAME_MODAL, 'headerCloseVariant') }, headerClass: { - type: [String, Array, Object] - // default: null + type: [String, Array, Object], + default: () => getComponentConfig(NAME_MODAL, 'headerClass') }, bodyBgVariant: { type: String, @@ -141,20 +141,20 @@ export const props = { default: () => getComponentConfig(NAME_MODAL, 'bodyTextVariant') }, modalClass: { - type: [String, Array, Object] - // default: null + type: [String, Array, Object], + default: () => getComponentConfig(NAME_MODAL, 'modalClass') }, dialogClass: { - type: [String, Array, Object] - // default: null + type: [String, Array, Object], + default: () => getComponentConfig(NAME_MODAL, 'dialogClass') }, contentClass: { - type: [String, Array, Object] - // default: null + type: [String, Array, Object], + default: () => getComponentConfig(NAME_MODAL, 'contentClass') }, bodyClass: { - type: [String, Array, Object] - // default: null + type: [String, Array, Object], + default: () => getComponentConfig(NAME_MODAL, 'bodyClass') }, footerBgVariant: { type: String, @@ -169,40 +169,40 @@ export const props = { default: () => getComponentConfig(NAME_MODAL, 'footerTextVariant') }, footerClass: { - type: [String, Array, Object] - // default: null + type: [String, Array, Object], + default: () => getComponentConfig(NAME_MODAL, 'footerClass') }, // TODO: Rename to `noHeader` and deprecate `hideHeader` hideHeader: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'hideHeader') }, // TODO: Rename to `noFooter` and deprecate `hideFooter` hideFooter: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'hideFooter') }, // TODO: Rename to `noHeaderClose` and deprecate `hideHeaderClose` hideHeaderClose: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'hideHeaderClose') }, // TODO: Rename to `noBackdrop` and deprecate `hideBackdrop` hideBackdrop: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'hideBackdrop') }, okOnly: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'okOnly') }, okDisabled: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'okDisabled') }, cancelDisabled: { type: Boolean, - default: false + default: () => getComponentConfig(NAME_MODAL, 'cancelDisabled') }, visible: { type: Boolean, diff --git a/src/utils/config-defaults.js b/src/utils/config-defaults.js index 39c1abf65d0..06477b4e96d 100644 --- a/src/utils/config-defaults.js +++ b/src/utils/config-defaults.js @@ -243,15 +243,37 @@ export default deepFreeze({ [NAME_MODAL]: { titleTag: 'h5', size: 'md', + centered: false, + scrollable: false, + buttonSize: undefined, + noStacking: false, + noFade: false, + noCloseOnBackdrop: false, + noCloseOnEsc: false, + noEnforceFocus: false, + titleClass: undefined, headerBgVariant: undefined, headerBorderVariant: undefined, headerTextVariant: undefined, headerCloseVariant: undefined, + headerClass: undefined, bodyBgVariant: undefined, bodyTextVariant: undefined, + modalClass: undefined, + dialogClass: undefined, + contentClass: undefined, + bodyClass: undefined, footerBgVariant: undefined, footerBorderVariant: undefined, footerTextVariant: undefined, + footerClass: undefined, + hideHeader: false, + hideFooter: false, + hideHeaderClose: false, + hideBackdrop: false, + okOnly: false, + okDisabled: false, + cancelDisabled: false, cancelTitle: 'Cancel', cancelVariant: 'secondary', okTitle: 'OK',