Add and use clsx (classnames alternative) (#2249)

Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
Danila
2020-10-19 17:14:28 +03:00
committed by GitHub
parent 1484c5a63b
commit b50c54f855
18 changed files with 108 additions and 72 deletions
+4 -3
View File
@@ -1,4 +1,5 @@
import React from "react";
import clsx from "clsx";
import * as i18n from "../i18n";
export const LanguageList = ({
@@ -14,9 +15,9 @@ export const LanguageList = ({
}) => (
<React.Fragment>
<select
className={`dropdown-select dropdown-select__language${
floating ? " dropdown-select--floating" : ""
}`}
className={clsx("dropdown-select dropdown-select__language", {
"dropdown-select--floating": floating,
})}
onChange={({ target }) => onChange(target.value)}
value={currentLanguage}
aria-label={i18n.t("buttons.selectLanguage")}