Replace classnames with clsx

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2022-08-31 11:35:06 +02:00
parent 7f99568c73
commit 03d6211e1c
114 changed files with 118 additions and 112 deletions

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useState } from 'react';
import { defineMessages, useIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { List as ImmutableList, Map as ImmutableMap } from 'immutable';
import React, { useState } from 'react';
import { FormattedMessage } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useState } from 'react';
import AnimatedNumber from 'soapbox/components/animated-number';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { TransitionMotion, spring } from 'react-motion';

View file

@ -1,5 +1,5 @@
import Portal from '@reach/portal';
import classNames from 'classnames';
import classNames from 'clsx';
import { List as ImmutableList } from 'immutable';
import React from 'react';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,5 +1,5 @@
import Portal from '@reach/portal';
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import ImmutablePureComponent from 'react-immutable-pure-component';
import Textarea from 'react-textarea-autosize';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import StillImage from 'soapbox/components/still_image';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
interface IBadge {

View file

@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import React from 'react';
import { withRouter } from 'react-router-dom';
// import classNames from 'classnames';
// import classNames from 'clsx';
// import { injectIntl, defineMessages } from 'react-intl';
// import Icon from 'soapbox/components/icon';
import SubNavigation from 'soapbox/components/sub_navigation';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { supportsPassiveEvents } from 'detect-passive-events';
import React from 'react';
import { spring } from 'react-motion';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useState, useEffect, useRef } from 'react';
import { usePopper } from 'react-popper';
import { useDispatch } from 'react-redux';

View file

@ -1,4 +1,4 @@
// import classNames from 'classnames';
// import classNames from 'clsx';
import React from 'react';
import { HotKeys } from 'react-hotkeys';
import ImmutablePureComponent from 'react-immutable-pure-component';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import debounce from 'lodash/debounce';
import PropTypes from 'prop-types';
import React from 'react';

View file

@ -5,7 +5,7 @@
* @see soapbox/components/icon
*/
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
export interface IForkAwesomeIcon extends React.HTMLAttributes<HTMLLIElement> {

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useState } from 'react';
import { FormattedMessage } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { debounce } from 'lodash';
import React, { useRef } from 'react';
import { useDispatch } from 'react-redux';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import debounce from 'lodash/debounce';
import React, { useRef } from 'react';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import PropTypes from 'prop-types';
import React from 'react';
import spring from 'react-motion/lib/spring';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import * as React from 'react';
import { v4 as uuidv4 } from 'uuid';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { Map as ImmutableMap, is } from 'immutable';
import PropTypes from 'prop-types';
import React from 'react';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { createBrowserHistory } from 'history';
import PropTypes from 'prop-types';
import React from 'react';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
import { Motion, presets, spring } from 'react-motion';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useEffect, useState } from 'react';
import { FormattedMessage } from 'react-intl';
import { usePopper } from 'react-popper';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
interface IProgressCircle {

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useState } from 'react';
import { defineMessages, useIntl, FormattedMessage, FormattedList } from 'react-intl';
import { useHistory } from 'react-router-dom';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
interface IRadioButton {

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import throttle from 'lodash/throttle';
import React, { useState, useEffect, useCallback } from 'react';
import { useIntl, MessageDescriptor } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { NavLink } from 'react-router-dom';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
import { useDispatch } from 'react-redux';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { useSoapboxConfig, useSettings, useTheme } from 'soapbox/hooks';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { List as ImmutableList } from 'immutable';
import React from 'react';
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { Text, Icon, Emoji } from 'soapbox/components/ui';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useEffect, useState, useCallback } from 'react';
import { usePopper } from 'react-popper';
import { useHistory } from 'react-router-dom';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useEffect, useRef, useState } from 'react';
import { HotKeys } from 'react-hotkeys';
import { useIntl, FormattedMessage, defineMessages } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useState, useRef, useEffect, useMemo } from 'react';
import { FormattedMessage } from 'react-intl';
import { useHistory } from 'react-router-dom';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import debounce from 'lodash/debounce';
import React, { useRef, useCallback } from 'react';
import { FormattedMessage } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useRef } from 'react';
import { useSettings } from 'soapbox/hooks';

View file

@ -4,7 +4,7 @@
* @see soapbox/components/icon
*/
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import InlineSVG from 'react-inlinesvg'; // eslint-disable-line no-restricted-imports

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { NavLink, useLocation } from 'react-router-dom';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import * as React from 'react';
import StillImage from 'soapbox/components/still_image';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
interface IBanner {

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import * as React from 'react';
import { Link } from 'react-router-dom';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
type ButtonThemes = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'danger' | 'transparent' | 'outline'
type ButtonSizes = 'sm' | 'md' | 'lg'

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
import { Link } from 'react-router-dom';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { Emoji, HStack } from 'soapbox/components/ui';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { forwardRef } from 'react';
const justifyContentOptions = {

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import SvgIcon from '../icon/svg-icon';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import StickyBox from 'react-sticky-box';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import * as React from 'react';
import { defineMessages, useIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
type SIZES = 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 10

View file

@ -5,7 +5,7 @@ import {
Tab as ReachTab,
useTabsContext,
} from '@reach/tabs';
import classNames from 'classnames';
import classNames from 'clsx';
import * as React from 'react';
import { useHistory } from 'react-router-dom';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
type Themes = 'default' | 'danger' | 'primary' | 'muted' | 'subtle' | 'success' | 'inherit' | 'white'

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
interface ITextarea extends Pick<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'maxLength' | 'onChange' | 'required' | 'disabled' | 'rows' | 'readOnly'> {

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { HStack, Icon, Text } from 'soapbox/components/ui';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { useIntl, defineMessages } from 'react-intl';

View file

@ -1,7 +1,7 @@
'use strict';
import { QueryClientProvider } from '@tanstack/react-query';
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useState, useEffect } from 'react';
import { IntlProvider } from 'react-intl';
import { Provider } from 'react-redux';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useState } from 'react';
import Blurhash from 'soapbox/components/blurhash';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
import { useDispatch } from 'react-redux';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import debounce from 'lodash/debounce';
import throttle from 'lodash/throttle';
import PropTypes from 'prop-types';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useEffect, useState } from 'react';
import { defineMessages, useIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import {
Map as ImmutableMap,
List as ImmutableList,

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import get from 'lodash/get';
import PropTypes from 'prop-types';
import React from 'react';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { IconButton } from 'soapbox/components/ui';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { supportsPassiveEvents } from 'detect-passive-events';
import PropTypes from 'prop-types';
import React from 'react';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { supportsPassiveEvents } from 'detect-passive-events';
import React, { useState, useRef, useEffect } from 'react';
import { useIntl, defineMessages } from 'react-intl';

View file

@ -1,6 +1,6 @@
'use strict';
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { Map as ImmutableMap } from 'immutable';
import debounce from 'lodash/debounce';
import React, { useCallback } from 'react';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useEffect, useRef } from 'react';
import { FormattedMessage, defineMessages, useIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { length } from 'stringz';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useState } from 'react';
import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
import { spring } from 'react-motion';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { useAppSelector } from 'soapbox/hooks';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { FormattedMessage } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useEffect, useState } from 'react';
import { defineMessages, useIntl } from 'react-intl';
import { useDispatch } from 'react-redux';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useState } from 'react';
import Icon from 'soapbox/components/icon';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useEffect, useState } from 'react';
import { FormattedMessage } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useState, useRef } from 'react';
import { v4 as uuidv4 } from 'uuid';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import PropTypes from 'prop-types';
import React from 'react';
import { defineMessages, injectIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import PropTypes from 'prop-types';
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import PropTypes from 'prop-types';
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { List as ImmutableList, Map as ImmutableMap } from 'immutable';
import debounce from 'lodash/debounce';
import React, { useCallback, useEffect, useRef } from 'react';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import * as React from 'react';
import { useDispatch } from 'react-redux';
import ReactSwipeableViews from 'react-swipeable-views';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { useDispatch } from 'react-redux';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { useDispatch } from 'react-redux';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import * as React from 'react';
import { randomIntFromInterval, generateText } from '../utils';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import * as React from 'react';
import PlaceholderAvatar from './placeholder_avatar';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import AttachmentThumbs from 'soapbox/components/attachment-thumbs';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { supportsPassiveEvents } from 'detect-passive-events';
import Picker from 'emoji-mart/dist-es/components/picker/picker';
import PropTypes from 'prop-types';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React, { useMemo } from 'react';
import { FormattedMessage } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classnames from 'classnames';
import classnames from 'clsx';
import { List as ImmutableList } from 'immutable';
import React, { useState, useEffect } from 'react';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
import React from 'react';
import { FormattedNumber } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { OrderedSet as ImmutableOrderedSet } from 'immutable';
import React from 'react';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { List as ImmutableList, OrderedSet as ImmutableOrderedSet } from 'immutable';
import { debounce } from 'lodash';
import React, { useCallback, useEffect, useRef, useState } from 'react';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { spring } from 'react-motion';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import React from 'react';
interface IBackgroundShapes {

View file

@ -1,6 +1,6 @@
import React from 'react';
// import classNames from 'classnames';
// import classNames from 'clsx';
// import Icon from 'soapbox/components/icon';
import SubNavigation from 'soapbox/components/sub_navigation';

View file

@ -1,4 +1,4 @@
import classNames from 'classnames';
import classNames from 'clsx';
import { List as ImmutableList } from 'immutable';
import React, { useEffect } from 'react';
import { FormattedDate, FormattedMessage } from 'react-intl';

Some files were not shown because too many files have changed in this diff Show more