fix(Map): Fixed a lot of design and architect issues after last milli… (#154)

* fix(Map): Fixed a lot of design and architect issues after last million PRs

* fix(Map): removed unnecessary hooks styles

---------

Co-authored-by: achichenkov <aleksei.chichenkov@telleqt.ai>
This commit is contained in:
Aleksei Chichenkov
2025-02-09 12:36:25 +03:00
committed by GitHub
parent 78eefcd6a7
commit cab1880fb0
32 changed files with 318 additions and 300 deletions

View File

@@ -10,8 +10,7 @@ import { WdCheckbox, WdTooltipWrapper } from '@/hooks/Mapper/components/ui-kit';
* - "checkbox": show only the checkbox (no text)
* - "hide": do not render the checkbox at all
*/
export type WdDisplayMode = "full" | "abbr" | "checkbox" | "hide";
export type WdDisplayMode = 'full' | 'abbr' | 'checkbox' | 'hide';
export interface WdResponsiveCheckboxProps {
tooltipContent: string;
@@ -38,21 +37,21 @@ export const WdResponsiveCheckbox: React.FC<WdResponsiveCheckboxProps> = ({
labelSide = 'left',
displayMode,
}) => {
if (displayMode === "hide") {
if (displayMode === 'hide') {
return null;
}
const label =
displayMode === "full"
displayMode === 'full'
? labelFull
: displayMode === "abbr"
? labelAbbreviated
: displayMode === "checkbox"
? ""
: labelFull;
: displayMode === 'abbr'
? labelAbbreviated
: displayMode === 'checkbox'
? ''
: labelFull;
const checkbox = (
<div className={clsx("min-w-0", containerClassName)}>
<div className={clsx('min-w-0', containerClassName)}>
<WdCheckbox
size={size}
labelSide={labelSide}
@@ -64,9 +63,5 @@ export const WdResponsiveCheckbox: React.FC<WdResponsiveCheckboxProps> = ({
</div>
);
return tooltipContent ? (
<WdTooltipWrapper content={tooltipContent}>{checkbox}</WdTooltipWrapper>
) : (
checkbox
);
return tooltipContent ? <WdTooltipWrapper content={tooltipContent}>{checkbox}</WdTooltipWrapper> : checkbox;
};