1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

Inline kind classnames

This commit is contained in:
Jorik Schellekens
2020-06-10 16:48:34 +01:00
parent 52c7577972
commit 737fc46b87

View File

@@ -100,15 +100,14 @@ export default function AccessibleButton({
// Pass through the ref - used for keyboard shortcut access to some buttons
newProps.ref = inputRef;
let classNameBooleans = {
"mx_AccessibleButton_hasKind": kind,
"mx_AccessibleButton_disabled": disabled,
}
classNameBooleans["mx_AccessibleButton_kind_" + kind] = kind;
newProps.className = classnames(
"mx_AccessibleButton",
className,
classNameBooleans,
{
"mx_AccessibleButton_hasKind": kind,
[`mx_AccessibleButton_kind_${kind}`]: kind,
"mx_AccessibleButton_disabled": disabled,
},
);
// React.createElement expects InputHTMLAttributes