Update 0BDFDB.plugin.js
This commit is contained in:
parent
f512d2318e
commit
94639a0921
|
@ -2,7 +2,7 @@
|
|||
* @name BDFDB
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 2.8.3
|
||||
* @version 2.8.4
|
||||
* @description Required Library for DevilBro's Plugins
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -4723,13 +4723,13 @@ module.exports = (_ => {
|
|||
handleContextMenu(e) {if (typeof this.props.onContextMenu == "function") this.props.onContextMenu(e, this);}
|
||||
handleMouseEnter(e) {if (typeof this.props.onMouseEnter == "function") this.props.onMouseEnter(e, this);}
|
||||
handleMouseLeave(e) {if (typeof this.props.onMouseLeave == "function") this.props.onMouseLeave(e, this);}
|
||||
getBadgeWidthForValue(e) {return e < 10 ? 16 : e < 100 ? 22 : 30}
|
||||
render() {
|
||||
return BDFDB.ReactUtils.createElement("div", {
|
||||
className: BDFDB.DOMUtils.formatClassName(this.props.className, BDFDB.disCN.badgenumberbadge, this.props.shape && Internal.LibraryComponents.Badges.BadgeShapes[this.props.shape] || Internal.LibraryComponents.Badges.BadgeShapes.ROUND),
|
||||
style: Object.assign({
|
||||
backgroundColor: !this.props.disableColor && (this.props.color || Internal.DiscordConstants.Colors.STATUS_RED),
|
||||
width: Internal.LibraryComponents.Badges.getBadgeWidthForValue(this.props.count),
|
||||
paddingRight: Internal.LibraryComponents.Badges.getBadgePaddingForValue(this.props.count)
|
||||
width: this.getBadgeWidthForValue(this.props.count)
|
||||
}, this.props.style),
|
||||
onClick: this.handleClick.bind(this),
|
||||
onContextMenu: this.handleContextMenu.bind(this),
|
||||
|
|
Loading…
Reference in New Issue