mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Replace classnames with clsx
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { TransitionMotion, spring, presets } from 'react-motion';
|
||||
import { FormattedMessage as Message } from 'react-intl';
|
||||
import classNames from 'classnames';
|
||||
import clsx from 'clsx';
|
||||
|
||||
import LocaleItem from './LocaleItem';
|
||||
import messages from './languageSwitcher.intl.json';
|
||||
@@ -38,7 +38,7 @@ export default class LanguageList extends React.Component<{
|
||||
{items => (
|
||||
<div className={styles.languagesList}>
|
||||
<div
|
||||
className={classNames(styles.emptyLanguagesListWrapper, {
|
||||
className={clsx(styles.emptyLanguagesListWrapper, {
|
||||
[styles.emptyLanguagesListVisible]: isListEmpty,
|
||||
})}
|
||||
style={{
|
||||
@@ -69,7 +69,7 @@ export default class LanguageList extends React.Component<{
|
||||
<div
|
||||
key={locale}
|
||||
style={style}
|
||||
className={classNames(styles.languageItem, {
|
||||
className={clsx(styles.languageItem, {
|
||||
[styles.activeLanguageItem]: locale === selectedLocale,
|
||||
[styles.firstLanguageItem]: locale === firstLocale,
|
||||
})}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { FormattedMessage as Message, injectIntl, IntlShape } from 'react-intl';
|
||||
import classNames from 'classnames';
|
||||
import clsx from 'clsx';
|
||||
import { connect } from 'react-redux';
|
||||
import { changeLang } from 'app/components/user/actions';
|
||||
import LANGS from 'app/i18n';
|
||||
@@ -69,7 +69,7 @@ class LanguageSwitcher extends React.Component<
|
||||
<Message {...messages.siteLanguage} />
|
||||
</h2>
|
||||
<span
|
||||
className={classNames(icons.close, popupStyles.close)}
|
||||
className={clsx(icons.close, popupStyles.close)}
|
||||
onClick={onClose}
|
||||
/>
|
||||
</div>
|
||||
@@ -77,7 +77,7 @@ class LanguageSwitcher extends React.Component<
|
||||
<div className={styles.languageSwitcherBody}>
|
||||
<div className={styles.searchBox}>
|
||||
<input
|
||||
className={classNames(
|
||||
className={clsx(
|
||||
formStyles.lightTextField,
|
||||
formStyles.greenTextField,
|
||||
)}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import clsx from 'clsx';
|
||||
import { localeFlags } from 'app/components/i18n';
|
||||
import LANGS from 'app/i18n';
|
||||
import { connect } from 'react-redux';
|
||||
@@ -24,7 +24,7 @@ function LanguageLink({
|
||||
|
||||
return (
|
||||
<span
|
||||
className={classNames(styles.languageLink, {
|
||||
className={clsx(styles.languageLink, {
|
||||
[styles.mark]: userLang !== interfaceLocale,
|
||||
})}
|
||||
onClick={showLanguageSwitcherPopup}
|
||||
|
Reference in New Issue
Block a user