Update 0BDFDB.plugin.js
This commit is contained in:
parent
1182f74dac
commit
7fc958c679
|
@ -6376,6 +6376,15 @@ module.exports = (_ => {
|
||||||
let childComponent = InternalComponents.LibraryComponents[this.props.type];
|
let childComponent = InternalComponents.LibraryComponents[this.props.type];
|
||||||
if (!childComponent) return null;
|
if (!childComponent) return null;
|
||||||
if (this.props.mini && childComponent.Sizes) this.props.size = childComponent.Sizes.MINI || childComponent.Sizes.MIN;
|
if (this.props.mini && childComponent.Sizes) this.props.size = childComponent.Sizes.MINI || childComponent.Sizes.MIN;
|
||||||
|
let label = this.props.label ? (this.props.tag ? BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.FormComponents.FormTitle, {
|
||||||
|
className: BDFDB.DOMUtils.formatClassName(this.props.labelClassName, BDFDB.disCN.marginreset),
|
||||||
|
tag: this.props.tag,
|
||||||
|
children: this.props.label
|
||||||
|
}) : BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.SettingsLabel, {
|
||||||
|
className: BDFDB.DOMUtils.formatClassName(this.props.labelClassName),
|
||||||
|
mini: this.props.mini,
|
||||||
|
label: this.props.label
|
||||||
|
})) : null;
|
||||||
let margin = this.props.margin != null ? this.props.margin : (this.props.mini ? 0 : 8);
|
let margin = this.props.margin != null ? this.props.margin : (this.props.mini ? 0 : 8);
|
||||||
return BDFDB.ReactUtils.createElement("div", {
|
return BDFDB.ReactUtils.createElement("div", {
|
||||||
className: BDFDB.DOMUtils.formatClassName(this.props.className, BDFDB.disCN.settingsrow, BDFDB.disCN.settingsrowcontainer, this.props.disabled && BDFDB.disCN.settingsrowdisabled, margin != null && (BDFDB.DiscordClasses[`marginbottom${margin}`] && BDFDB.disCN[`marginbottom${margin}`] || margin == 0 && BDFDB.disCN.marginreset)),
|
className: BDFDB.DOMUtils.formatClassName(this.props.className, BDFDB.disCN.settingsrow, BDFDB.disCN.settingsrowcontainer, this.props.disabled && BDFDB.disCN.settingsrowdisabled, margin != null && (BDFDB.DiscordClasses[`marginbottom${margin}`] && BDFDB.disCN[`marginbottom${margin}`] || margin == 0 && BDFDB.disCN.marginreset)),
|
||||||
|
@ -6387,15 +6396,12 @@ module.exports = (_ => {
|
||||||
BDFDB.ReactUtils.createElement("div", {
|
BDFDB.ReactUtils.createElement("div", {
|
||||||
className: BDFDB.disCN.settingsrowlabel,
|
className: BDFDB.disCN.settingsrowlabel,
|
||||||
children: [
|
children: [
|
||||||
this.props.label ? (this.props.tag ? BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.FormComponents.FormTitle, {
|
label && BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Flex.Child, {
|
||||||
className: BDFDB.DOMUtils.formatClassName(this.props.labelClassName, BDFDB.disCN.flexchild, BDFDB.disCN.marginreset),
|
grow: 1,
|
||||||
tag: this.props.tag,
|
shrink: 1,
|
||||||
children: this.props.label
|
wrap: true,
|
||||||
}) : BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.SettingsLabel, {
|
children: label
|
||||||
className: BDFDB.DOMUtils.formatClassName(this.props.labelClassName, BDFDB.disCN.flexchild),
|
}),
|
||||||
mini: this.props.mini,
|
|
||||||
label: this.props.label
|
|
||||||
})) : null,
|
|
||||||
this.props.labelchildren,
|
this.props.labelchildren,
|
||||||
BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Flex.Child, {
|
BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Flex.Child, {
|
||||||
className: BDFDB.disCNS.settingsrowcontrol + BDFDB.disCN.flexchild,
|
className: BDFDB.disCNS.settingsrowcontrol + BDFDB.disCN.flexchild,
|
||||||
|
|
Loading…
Reference in New Issue