Skip to content

Commit

Permalink
Merge pull request #3882 from JoinColony/maint/classnameclassnames
Browse files Browse the repository at this point in the history
  • Loading branch information
chmanie authored Dec 19, 2024
2 parents 3ec74f0 + d7e7c6e commit bdbaac9
Show file tree
Hide file tree
Showing 37 changed files with 49 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const ActionsTableFilters: FC = () => {
hasShadow: true,
className: 'pt-6 pb-4 px-2',
}}
classNames="sm:min-w-[20.375rem]"
className="sm:min-w-[20.375rem]"
>
<div className="mb-6 px-4">{searchInput}</div>
{filtersContent}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const ActionTableFiltersItem: FC<ActionTableFiltersItemProps> = ({
hasShadow: true,
className: 'pt-6 pb-4 px-2.5',
}}
classNames="sm:min-w-[20.375rem]"
className="sm:min-w-[20.375rem]"
>
{children}
</PopoverBase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const ActionTypeFilters: FC = () => {
return (
<li key={name}>
<Checkbox
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
name={name}
onChange={handleActionTypesFilterChange}
isChecked={isChecked}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const DateFilters: FC = () => {
return (
<li key={name}>
<Checkbox
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
name={name}
isChecked={isChecked}
onChange={handleDateFilterChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const DecisionMethodFilters: FC = () => {
return (
<li key={name}>
<Checkbox
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
name={name}
isChecked={isChecked}
onChange={handleDecisionMethodsFilterChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const StatusFilters: FC = () => {
return (
<li key={name}>
<Checkbox
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
name={name}
onChange={handleMotionStatesFilterChange}
isChecked={isChecked}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const UserHubButton: FC<Props> = ({ openTab, onOpen }) => {
<PopoverBase
setTooltipRef={setTooltipRef}
tooltipProps={getTooltipProps}
classNames={clsx(
className={clsx(
'w-full border-none bg-base-white p-0 shadow-none sm:w-auto sm:rounded-lg sm:border sm:border-solid sm:border-gray-200 sm:shadow-default',
{
'!top-[calc(var(--header-nav-section-height)-1.4rem)] h-[calc(100dvh-var(--top-content-height)+1.5rem)] !translate-x-0 !translate-y-0':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const UserMenu: FC<UserMenuProps> = ({
setTooltipRef={setTooltipRef}
tooltipProps={tooltipProps}
withTooltipStyles={!isTablet}
classNames={clsx(
className={clsx(
'w-full overflow-hidden bg-base-white p-6 md:w-80 md:rounded-lg md:border md:border-gray-100 md:shadow-default',
{
'!top-[calc(var(--header-nav-section-height))] h-[calc(100vh-var(--top-content-height))] !translate-y-0':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const UninstallButton = ({
label={MSG[extensionId].uninstallConfirmation}
isChecked={isCheckboxChecked}
onChange={() => setIsCheckboxChecked((prevState) => !prevState)}
classNames="mt-5"
className="mt-5"
/>
</Modal>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const RootFilter: FC<PermissionsPageFilterRootProps> = ({

onChange(updatedFilterValue);
}}
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
>
{checkboxLabel}
</Checkbox>
Expand All @@ -111,7 +111,7 @@ const RootFilter: FC<PermissionsPageFilterRootProps> = ({
[nestedValue]: !filterValue[nestedValue],
});
}}
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
>
{nestedCheckboxLabel}
</Checkbox>
Expand Down Expand Up @@ -143,7 +143,7 @@ const RootFilter: FC<PermissionsPageFilterRootProps> = ({
hasShadow: true,
className: 'py-6 px-2',
}}
classNames="w-full sm:max-w-[13.25rem]"
className="w-full sm:max-w-[13.25rem]"
>
<span className="px-3.5 pb-2 uppercase text-gray-400 text-4">
{formatText({ id: 'permissions.type' })}
Expand Down Expand Up @@ -178,7 +178,7 @@ const RootFilter: FC<PermissionsPageFilterRootProps> = ({

onChange(updatedFilterValue);
}}
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
>
{checkboxLabel}
</Checkbox>
Expand All @@ -192,7 +192,7 @@ const RootFilter: FC<PermissionsPageFilterRootProps> = ({
hasShadow: true,
className: 'py-6 px-2',
}}
classNames="w-full sm:max-w-[13.25rem]"
className="w-full sm:max-w-[13.25rem]"
>
<span className="px-3.5 uppercase text-gray-400 text-4">
{formatText({ id: 'permissions.type' })}
Expand All @@ -211,7 +211,7 @@ const RootFilter: FC<PermissionsPageFilterRootProps> = ({
[nestedValue]: !filterValue[nestedValue],
});
}}
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
>
{nestedCheckboxLabel}
</Checkbox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const PermissionsPageFilter: FC<PermissionsPageFilterProps> = ({
hasShadow: true,
className: 'pt-6 pb-4 px-2.5',
}}
classNames="w-full sm:max-w-[20.375rem]"
className="w-full sm:max-w-[20.375rem]"
>
<div className="mb-6 px-3.5">
<SearchInputDesktop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const AgreementsPageFilters: FC = () => {
hasShadow: true,
className: 'pt-6 pb-4 px-2',
}}
classNames="sm:min-w-[20.375rem]"
className="sm:min-w-[20.375rem]"
>
<div className="mb-6 px-4">{SearchInputComponent}</div>
{FiltersContent}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const DateFilters: FC = () => {
return (
<li key={name}>
<Checkbox
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
name={name}
isChecked={isChecked}
onChange={handleDateFilterChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const StatusFilters: FC = () => {
return (
<li key={name}>
<Checkbox
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
name={name}
onChange={handleMotionStatesFilterChange}
isChecked={isChecked}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const AgreementsPageFiltersItem: FC<AgreementsPageFiltersItemProps> = ({
hasShadow: true,
className: 'pt-6 pb-4 px-2.5',
}}
classNames="sm:min-w-[20.375rem]"
className="sm:min-w-[20.375rem]"
>
{children}
</PopoverBase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const BalanceFilters: FC<BalanceFiltersProps> = ({ toggleAddFundsModalOn }) => {
hasShadow: true,
className: 'pt-6 pb-4 px-2',
}}
classNames="sm:min-w-[20.375rem]"
className="sm:min-w-[20.375rem]"
>
<div className="mb-6 px-4">{searchInput}</div>
{filtersContent}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const BalanceTableFiltersItem: FC<BalanceTableFiltersItemProps> = ({
hasShadow: true,
className: 'pt-6 pb-4 px-2.5',
}}
classNames="sm:min-w-[20.375rem]"
className="sm:min-w-[20.375rem]"
>
{children}
</PopoverBase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const AttributeFilters: FC = () => {
return (
<li key={name}>
<Checkbox
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
name={name}
onChange={handleAttributeFilterChange}
isChecked={isChecked}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const TokenFilters: FC = () => {
return (
<li key={name}>
<Checkbox
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
name={name}
onChange={handleTokenTypesFilterChange}
isChecked={isChecked}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function Filter<TValue extends FilterValue>({
hasShadow: true,
className: 'pt-6 pb-4 px-2.5',
}}
classNames="w-full sm:max-w-[20.375rem]"
className="w-full sm:max-w-[20.375rem]"
>
<div className="mb-6 px-3.5">
<SearchInputDesktop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function FilterItem<TValue extends FilterValue>({
hasShadow: true,
className: 'py-6 px-2',
}}
classNames="w-full sm:max-w-[13.25rem] mr-2"
className="mr-2 w-full sm:max-w-[13.25rem]"
>
<>
<span className="px-3.5 pb-2 uppercase text-gray-400 text-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function NestedFilterItem<TValue extends FilterValue, TLevel extends number>({
onChange={(e) => {
onChange(set(cloneDeep(value), path, e.target.checked));
}}
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
>
{label}
</Checkbox>
Expand Down Expand Up @@ -81,7 +81,7 @@ function NestedFilterItem<TValue extends FilterValue, TLevel extends number>({
onChange={(e) => {
onChange(set(cloneDeep(value), path, e.target.checked));
}}
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
>
{label}
</Checkbox>
Expand All @@ -96,7 +96,7 @@ function NestedFilterItem<TValue extends FilterValue, TLevel extends number>({
hasShadow: true,
className: 'py-6 px-2',
}}
classNames="w-full sm:max-w-[13.25rem] mr-2"
className="mr-2 w-full sm:max-w-[13.25rem]"
>
{NestedItems}
</PopoverBase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const FilterItem: FC<TeamsPageFilterRootProps> = ({
direction: value,
});
}}
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
>
{checkboxLabel}
</Checkbox>
Expand All @@ -82,7 +82,7 @@ const FilterItem: FC<TeamsPageFilterRootProps> = ({
hasShadow: true,
className: 'py-6 px-2',
}}
classNames="w-full sm:max-w-[13.25rem] mr-2"
className="mr-2 w-full sm:max-w-[13.25rem]"
>
<>
<span className="px-3.5 pb-2 uppercase text-gray-400 text-4">
Expand All @@ -101,7 +101,7 @@ const FilterItem: FC<TeamsPageFilterRootProps> = ({
direction: value as ModelSortDirection,
});
}}
classNames="subnav-button px-0 sm:px-3.5"
className="subnav-button px-0 sm:px-3.5"
>
{checkboxLabel}
</Checkbox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const TeamsPageFilter: FC<TeamsPageFilterProps> = ({
hasShadow: true,
className: 'pt-6 pb-4 px-2.5',
}}
classNames="w-full sm:max-w-[20.375rem]"
className="w-full sm:max-w-[20.375rem]"
>
<div className="mb-6 px-3.5">
<SearchInputDesktop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const PermissionsRemovalModal: React.FC<PermissionsRemovalModalProps> = ({
name="acknowledge"
isChecked={isAcknowledged}
onChange={() => setIsAcknowledged((state) => !state)}
classNames="mb-8"
className="mb-8"
disabled={isFormSubmitting}
>
<p className="text-md">{formatText(MSG.acknowledge)}</p>
Expand Down
4 changes: 2 additions & 2 deletions src/components/v5/common/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ const Checkbox: FC<PropsWithChildren<CheckboxProps>> = ({
register,
label = '',
onChange,
classNames,
className,
isChecked,
children,
}) => {
const generatedId = useId();

return (
<div
className={clsx(classNames, {
className={clsx(className, {
'pointer-events-none opacity-50': disabled,
})}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/v5/common/Checkbox/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export interface CheckboxProps {
name?: string;
id?: string;
disabled?: boolean;
classNames?: string;
className?: string;
isChecked?: boolean;
}
2 changes: 1 addition & 1 deletion src/components/v5/common/DropdownMenu/DropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const DropdownMenu: FC<DropdownMenuProps> = ({
hasShadow: true,
className: 'py-4 px-0',
}}
classNames="overflow-hidden w-full px-6 sm:px-0 sm:w-auto"
className="w-full overflow-hidden px-6 sm:w-auto sm:px-0"
>
<ul
className={clsx('w-full px-6 sm:w-[14.625rem]', {
Expand Down
2 changes: 1 addition & 1 deletion src/components/v5/common/Filter/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const Filter: FC<FilterProps> = ({
hasShadow: true,
className: 'pt-6 pb-4 px-2.5',
}}
classNames="w-full sm:max-w-[17.375rem]"
className="w-full sm:max-w-[17.375rem]"
>
<div className="sm:mb-6 sm:px-3.5">
<SearchInput
Expand Down
2 changes: 1 addition & 1 deletion src/components/v5/common/Table/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { type MeatBallMenuProps } from '~v5/shared/MeatBallMenu/types.ts';
import type React from 'react';

export type RenderCellWrapper<T> = (
classNames: string,
className: string,
content: React.ReactNode,
context: {
cell: Cell<T, unknown>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/v5/shared/CardWithBios/CardWithBios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const CardWithBios: FC<CardWithBiosProps> = ({
hasShadow: true,
className: 'py-4 px-2',
}}
classNames="w-full sm:max-w-[17.375rem]"
className="w-full sm:max-w-[17.375rem]"
>
<SubNavigation user={user} />
</PopoverBase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const JoinedColoniesPopover = ({
<PopoverBase
setTooltipRef={setTooltipRef}
tooltipProps={getTooltipProps}
classNames={clsx(
className={clsx(
'bg-white !left-[calc(100%+0.4rem)] z-top mt-4 max-h-[calc(100%-32px)] w-[252px] !transform-none rounded-lg border-gray-200 px-0 pb-4 pt-0 shadow-none',
{
'!bg-gray-100': isDarkMode,
Expand Down
4 changes: 2 additions & 2 deletions src/components/v5/shared/PopoverBase/PopoverBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const displayName = 'v5.PopoverBase';
const PopoverBase: FC<PropsWithChildren<PopoverBaseProps>> = ({
tooltipProps,
setTooltipRef,
classNames,
className,
children,
cardProps,
withTooltipStyles = true,
Expand All @@ -19,7 +19,7 @@ const PopoverBase: FC<PropsWithChildren<PopoverBaseProps>> = ({
<div
ref={setTooltipRef}
{...tooltipProps({
className: clsx(classNames, 'z-header', {
className: clsx(className, 'z-header', {
'tooltip-container': withTooltipStyles,
}),
})}
Expand Down
Loading

0 comments on commit bdbaac9

Please sign in to comment.