Skip to content

Commit

Permalink
refactor: use named import for clsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Jin Lee committed Apr 4, 2023
1 parent d093b15 commit d58182b
Show file tree
Hide file tree
Showing 115 changed files with 115 additions and 115 deletions.
2 changes: 1 addition & 1 deletion .storybook/components/TokenSpecimen/TokenSpecimen.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React, { Component } from 'react';
import './TokenSpecimen.css';

Expand Down
2 changes: 1 addition & 1 deletion .storybook/pages/AlongDemo/AlongDemo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React, { useId, useState } from 'react';

import {
Expand Down
2 changes: 1 addition & 1 deletion .storybook/pages/CoursePlannerEdit/CoursePlannerEdit.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React, { useState } from 'react';
import type { ReactNode } from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';

Expand Down
2 changes: 1 addition & 1 deletion .storybook/pages/CoursePlannerStep1/CoursePlannerStep1.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';

import {
Expand Down
2 changes: 1 addition & 1 deletion .storybook/pages/StudentRefinement/StudentRefinement.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import debounce from 'lodash.debounce';
import React, { useEffect, useState } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion .storybook/pages/WireframeDemo/WireframeDemo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React, { useId, useState } from 'react';

import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import { Card, Heading } from '../../../src';
Expand Down
2 changes: 1 addition & 1 deletion .storybook/recipes/CalendarCard/CalendarCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';

Expand Down
2 changes: 1 addition & 1 deletion .storybook/recipes/NumberIconList/NumberIconList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import styles from './NumberIconList.module.css';
Expand Down
2 changes: 1 addition & 1 deletion .storybook/recipes/PageShell/PageShell.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import { Link, Layout, LayoutContainer, LayoutSection } from '../../../src';
Expand Down
2 changes: 1 addition & 1 deletion .storybook/recipes/PrimaryNav/PrimaryNav.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import type { IconName } from '../../../src';
Expand Down
2 changes: 1 addition & 1 deletion plop-templates/Component/Component.tsx.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import {clsx} from 'clsx';
import React from 'react';
import styles from './{{pascalCase name}}.module.css';

Expand Down
2 changes: 1 addition & 1 deletion plop-templates/Recipe/Recipe.tsx.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import {clsx} from 'clsx';
import React from 'react';
import styles from './{{pascalCase name}}.module.css';

Expand Down
2 changes: 1 addition & 1 deletion src/components/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Disclosure } from '@headlessui/react';
import clsx from 'clsx';
import { clsx } from 'clsx';
import React, { createContext, useContext } from 'react';
import { ENTER_KEYCODE, SPACEBAR_KEYCODE } from '../../util/keycodes';
import Button from '../Button';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import Icon from '../Icon';
import styles from './Avatar.module.css';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Badge/Badge.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import Icon from '../Icon';
import type { IconName, IconProps } from '../Icon';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Banner/Banner.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import Button from '../Button';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Breadcrumbs/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import debounce from 'lodash.debounce';
import React, { type ReactNode } from 'react';
import { flattenReactChildren } from '../../util/flattenReactChildren';
Expand Down
2 changes: 1 addition & 1 deletion src/components/BreadcrumbsItem/BreadcrumbsItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import ButtonDropdown from '../ButtonDropdown';
import Icon from '../Icon';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React, { forwardRef } from 'react';
import ClickableStyle from '../ClickableStyle';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ButtonDropdown/ButtonDropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import type { ClickableStyleProps } from '../ClickableStyle';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ButtonGroup/ButtonGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import styles from './ButtonGroup.module.css';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { HTMLAttributes, ReactNode } from 'react';
import React from 'react';
import CardBody from '../CardBody';
Expand Down
2 changes: 1 addition & 1 deletion src/components/CardBody/CardBody.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import styles from '../Card/Card.module.css';
Expand Down
2 changes: 1 addition & 1 deletion src/components/CardFooter/CardFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import styles from '../Card/Card.module.css';
Expand Down
2 changes: 1 addition & 1 deletion src/components/CardHeader/CardHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import styles from '../Card/Card.module.css';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React, { useId } from 'react';
import type { EitherInclusive } from '../../util/utility-types';
import type { CheckboxInputProps } from '../CheckboxInput';
Expand Down
2 changes: 1 addition & 1 deletion src/components/CheckboxInput/CheckboxInput.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import useForwardedRef from '../../util/useForwardedRef';
import styles from './CheckboxInput.module.css';
Expand Down
2 changes: 1 addition & 1 deletion src/components/CheckboxLabel/CheckboxLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import type { InputLabelProps } from '../InputLabel/InputLabel';
import { InputLabel } from '../InputLabel/InputLabel';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ClickableStyle/ClickableStyle.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { MouseEventHandler, ReactNode } from 'react';
import React from 'react';
import styles from './ClickableStyle.module.css';
Expand Down
2 changes: 1 addition & 1 deletion src/components/DataBar/DataBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React, { useId } from 'react';

import DataBarSegment from '../DataBarSegment';
Expand Down
2 changes: 1 addition & 1 deletion src/components/DataBarSegment/DataBarSegment.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import Tooltip from '../Tooltip';
import styles from './DataBarSegment.module.css';
Expand Down
2 changes: 1 addition & 1 deletion src/components/DragDrop/DragDrop.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React, {
type ReactNode,
useState,
Expand Down
2 changes: 1 addition & 1 deletion src/components/DragDropContainer/DragDropContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import type { DroppableProvided } from 'react-beautiful-dnd';
Expand Down
2 changes: 1 addition & 1 deletion src/components/DragDropItem/DragDropItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import type { DraggableProvided } from 'react-beautiful-dnd';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Drawer/Drawer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React, {
useCallback,
useState,
Expand Down
2 changes: 1 addition & 1 deletion src/components/DrawerBody/DrawerBody.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import styles from '../Drawer/Drawer.module.css';
Expand Down
2 changes: 1 addition & 1 deletion src/components/DrawerFooter/DrawerFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';

Expand Down
2 changes: 1 addition & 1 deletion src/components/DrawerHeader/DrawerHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { MouseEventHandler, ReactNode } from 'react';
import React from 'react';
import Button from '../../components/Button';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dropdown/Dropdown.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BADGE } from '@geometricpanda/storybook-addon-badges';
import type { StoryObj, Meta } from '@storybook/react';
import { userEvent, within } from '@storybook/testing-library';
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import type { OptionsAlignType, VariantType } from './Dropdown';
import { Dropdown } from './Dropdown';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Listbox } from '@headlessui/react';
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactElement, ReactNode, ElementType } from 'react';
import React, { useContext } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion src/components/DropdownButton/DropdownButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React, { forwardRef } from 'react';
import Icon from '../Icon';
Expand Down
2 changes: 1 addition & 1 deletion src/components/DropdownMenu/DropdownMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type {
ReactNode,
KeyboardEvent,
Expand Down
2 changes: 1 addition & 1 deletion src/components/DropdownMenuItem/DropdownMenuItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode, MouseEventHandler } from 'react';
import React, { useContext } from 'react';
import { DropdownMenuContext } from '../DropdownMenu';
Expand Down
2 changes: 1 addition & 1 deletion src/components/FieldNote/FieldNote.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import Icon from '../Icon';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Fieldset/Fieldset.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import FieldsetItems from '../FieldsetItems';
Expand Down
2 changes: 1 addition & 1 deletion src/components/FieldsetItems/FieldsetItems.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
import React from 'react';
import styles from './FieldsetItems.module.css';
Expand Down
2 changes: 1 addition & 1 deletion src/components/FieldsetLegend/FieldsetLegend.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import styles from './FieldsetLegend.module.css';

Expand Down
2 changes: 1 addition & 1 deletion src/components/FiltersButton/FiltersButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React, { forwardRef } from 'react';
import Button, { type ButtonProps } from '../Button';
import type { VariantStatus } from '../ClickableStyle';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import Fieldset from '../Fieldset';
import FieldsetLegend from '../FieldsetLegend';
Expand Down
2 changes: 1 addition & 1 deletion src/components/FiltersDrawer/FiltersDrawer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactElement, ReactNode } from 'react';
import React, { useEffect, useId, useRef, useState } from 'react';
import Button from '../Button';
Expand Down
2 changes: 1 addition & 1 deletion src/components/FiltersPopover/FiltersPopover.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React, { type ReactNode, useEffect, useRef } from 'react';
import Button from '../Button';
import ButtonGroup from '../ButtonGroup';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Grid/Grid.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import GridItem from '../GridItem';
Expand Down
2 changes: 1 addition & 1 deletion src/components/GridItem/GridItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode } from 'react';
import React from 'react';
import styles from './GridItem.module.css';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Heading/Heading.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React, { forwardRef } from 'react';
import styles from './Heading.module.css';

Expand Down
2 changes: 1 addition & 1 deletion src/components/HorizontalStep/HorizontalStep.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import Icon from '../Icon';
import NumberIcon from '../NumberIcon';
Expand Down
2 changes: 1 addition & 1 deletion src/components/HorizontalStepper/HorizontalStepper.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import HorizontalStep from '../HorizontalStep';
import styles from './HorizontalStepper.module.css';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Hr/Hr.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import styles from './Hr.module.css';

Expand Down
2 changes: 1 addition & 1 deletion src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ReactNode, CSSProperties } from 'react';
import React from 'react';
import icons, { type IconName } from '../../icons/spritemap';
Expand Down
2 changes: 1 addition & 1 deletion src/components/InlineNotification/InlineNotification.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import Icon from '../Icon';
import Text from '../Text';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Input/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ChangeEventHandler } from 'react';
import React, { forwardRef } from 'react';
import styles from './Input.module.css';
Expand Down
2 changes: 1 addition & 1 deletion src/components/InputField/InputField.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import type { ChangeEventHandler, ReactNode } from 'react';
import React, { forwardRef, useId } from 'react';
import type { EitherInclusive } from '../../util/utility-types';
Expand Down
2 changes: 1 addition & 1 deletion src/components/InputLabel/InputLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import clsx from 'clsx';
import { clsx } from 'clsx';
import React from 'react';
import styles from './InputLabel.module.css';

Expand Down

0 comments on commit d58182b

Please sign in to comment.