From 09aa455c11f24ae113c7de8bc3cfb081221c4dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Gonz=C3=A1lez=20Mu=C3=B1oz?= Date: Mon, 25 Sep 2023 16:24:22 +0200 Subject: [PATCH] replaces classnames with clsx --- app/.eslintrc.js | 5 ----- app/components/breadcrumb/component.tsx | 5 ++--- app/components/carousel/component.tsx | 5 ++--- .../confirmation-prompt/component.tsx | 11 +++++------ app/components/disclaimer/component.tsx | 7 +++---- .../features/intersect-item/component.tsx | 7 +++---- .../features/raw-item/component.tsx | 17 +++++++++-------- .../features/selected-item/component.tsx | 11 +++++------ app/components/forms/error/component.tsx | 4 ++-- app/components/forms/field/component.tsx | 5 +++-- app/components/forms/input/component.tsx | 7 +++---- app/components/forms/radio/component.tsx | 4 ++-- .../forms/select/menu/component.tsx | 5 ++--- .../forms/select/multi/component.tsx | 13 ++++++------- .../forms/select/single/component.tsx | 13 ++++++------- .../forms/select/toggle/component.tsx | 11 +++++------ app/components/forms/slider/component.tsx | 6 +++--- .../forms/slider/thumb/component.tsx | 6 +++--- .../forms/slider/value/component.tsx | 6 +++--- app/components/forms/textarea/component.tsx | 4 ++-- .../gap-analysis/item/component.tsx | 7 +++---- app/components/icon/component.tsx | 4 ++-- app/components/info-button/component.tsx | 7 +++---- app/components/loading-more/component.tsx | 6 +++--- app/components/loading/component.tsx | 4 ++-- app/components/map/component.tsx | 5 ++--- .../map/controls/fit-bounds/component.tsx | 5 ++--- app/components/map/legend/component.tsx | 7 +++---- .../map/legend/sortable/list/component.tsx | 6 +++--- .../legend/sortable/list/item/component.tsx | 6 +++--- .../map/legend/types/basic/component.tsx | 4 ++-- .../map/legend/types/choropleth/component.tsx | 4 ++-- .../map/legend/types/matrix/component.tsx | 4 ++-- app/components/modal/component.tsx | 7 +++---- app/components/progress-bar/component.tsx | 4 ++-- .../scenarios/blm-chart/component.tsx | 8 ++++---- app/components/scenarios/item/component.tsx | 15 +++++++-------- app/components/table/component.tsx | 11 +++++------ app/components/table2/component.tsx | 9 ++++----- app/components/tabs/component.tsx | 6 +++--- app/components/tag/component.tsx | 6 +++--- app/components/toast/component.tsx | 11 +++++------ app/components/tooltip/arrow/component.tsx | 6 +++--- app/components/tooltip/component.tsx | 6 +++--- app/hooks/map/constants.tsx | 8 ++++---- app/hooks/map/index.ts | 2 +- .../table/item/duplicate-button/component.tsx | 17 +++++++++-------- app/layout/header/title/component.tsx | 13 ++++++------- app/layout/help/beacon/component.tsx | 7 +++---- app/layout/help/coming-soon/component.tsx | 7 +++---- app/layout/loading/component.tsx | 8 ++++---- app/layout/pill/component.tsx | 6 +++--- .../edit-dropdown/card/component.tsx | 5 ++--- .../contributors/edit-dropdown/component.tsx | 5 ++--- .../company-uploader/component.tsx | 5 ++--- .../blm-calibration/chart/component.tsx | 5 ++--- .../results/card/component.tsx | 19 +++++++++---------- .../blm-calibration/results/component.tsx | 5 ++--- .../features/add/add-modal/list/component.tsx | 7 +++---- .../features/add/intersect/list/component.tsx | 9 ++++----- .../grid-setup/gap-analysis/list/index.tsx | 4 +--- app/layout/projects/all/list/component.tsx | 5 ++--- .../projects/all/list/item/component.tsx | 17 ++++++++--------- .../upload-files/upload-item/component.tsx | 5 ++--- .../upload-btn/upload-modal/component.tsx | 5 ++--- .../planning-area-grid-uploader/component.tsx | 5 ++--- .../form/planning-area-uploader/component.tsx | 5 ++--- .../projects/show/scenarios/component.tsx | 9 ++++----- .../show/scenarios/types/component.tsx | 5 ++--- app/layout/scenarios/edit/tabs/component.tsx | 7 +++---- app/layout/sections/component.tsx | 8 ++++---- app/layout/sections/item/component.tsx | 9 ++++----- .../sign-up/password-strenght/component.tsx | 6 +++--- app/layout/statics/button-link/component.tsx | 9 ++++----- app/layout/statics/hero/component.tsx | 5 ++--- app/layout/toast/component.tsx | 2 +- app/layout/wrapper/component.tsx | 4 ++-- app/package.json | 1 - app/pages/_app.tsx | 5 ++--- app/yarn.lock | 8 -------- 80 files changed, 252 insertions(+), 310 deletions(-) diff --git a/app/.eslintrc.js b/app/.eslintrc.js index 3a1b217a46..6bf5d98687 100644 --- a/app/.eslintrc.js +++ b/app/.eslintrc.js @@ -62,11 +62,6 @@ module.exports = { pattern: '@react**', group: 'builtin', }, - { - pattern: 'classnames', - group: 'builtin', - position: 'after', - }, { pattern: 'lodash-es/**', group: 'builtin', diff --git a/app/components/breadcrumb/component.tsx b/app/components/breadcrumb/component.tsx index 45240311ac..0ef3aa8bc0 100644 --- a/app/components/breadcrumb/component.tsx +++ b/app/components/breadcrumb/component.tsx @@ -1,8 +1,7 @@ import React, { ButtonHTMLAttributes } from 'react'; -import cx from 'classnames'; - import Icon from 'components/icon'; +import { cn } from 'utils/cn'; import ARROW_LEFT_SVG from 'svgs/ui/arrow-left.svg?sprite'; import FOLDER_SVG from 'svgs/ui/folder.svg?sprite'; @@ -21,7 +20,7 @@ export const Breadcrum: React.FC = ({

= ({

= ({ })} >
= ({ {icon && (