refactor: replace classnames with clsx (#78)

This commit is contained in:
Razboy20
2024-02-05 21:27:22 -06:00
committed by GitHub
parent 1b51d65c89
commit b2b6a06280
11 changed files with 29 additions and 28 deletions

View File

@@ -1,4 +1,4 @@
import classNames from 'classnames';
import clsx from 'clsx';
import React, { PropsWithChildren } from 'react';
import styles from './Text.module.scss';
@@ -20,7 +20,7 @@ type Variant = (typeof variants)[number];
* A reusable Text component with props that build on top of the design system for the extension
*/
export default function Text({ variant, as, className, ...props }: PropsWithChildren<TextProps>) {
const mergedClassName = classNames(styles.text, styles[variant], className);
const mergedClassName = clsx(styles.text, styles[variant], className);
if (as === 'div') return <div className={mergedClassName} {...props} />;