Skip to content

Commit

Permalink
feat: swap goku/gohan in Alert, Avatar, AuthCode, BottomSheet [MDS-688]
Browse files Browse the repository at this point in the history
  • Loading branch information
dkireev committed Sep 21, 2023
1 parent 3766357 commit 1c0296d
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 0 deletions.
16 changes: 16 additions & 0 deletions workspaces/core/src/avatar/private/utils/getBorderRadius.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type SizeProps from '../types/SizeProps';

const getWrapperSize = (size?: SizeProps, isRounded?: boolean) => {
if (isRounded) {
return 'rounded-full';
}
if (size === 'xs') {
return 'rounded-moon-i-xs';
}
if (size === '2xl') {
return 'rounded-moon-i-md';
}
return 'rounded-moon-i-sm';
};

export default getWrapperSize;
13 changes: 13 additions & 0 deletions workspaces/core/src/avatar/private/utils/getIconSize.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type SizeProps from '../types/SizeProps';

const getIconSize = (size?: SizeProps) => {
if (size === 'xs') {
return 'text-moon-16';
}
if (size === '2xl') {
return 'text-moon-32';
}
return 'text-moon-24';
};

export default getIconSize;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type SizeProps from '../types/SizeProps';

const getStatusDeprecatedSize = (size?: SizeProps) => {
if (size === 'xs') {
return 'w-2 h-2 border';
}
if (size === 'sm' || size === 'md') {
return 'w-3 h-3 border-2';
}
return 'w-4 h-4 border-2';
};

export default getStatusDeprecatedSize;
13 changes: 13 additions & 0 deletions workspaces/core/src/avatar/private/utils/getStatusSize.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type SizeProps from '../types/SizeProps';

const getStatusSize = (size?: SizeProps) => {
if (size === 'xs') {
return '[&_.status]:w-2 [&_.status]:h-2 [&_.status]:border';
}
if (size === 'sm' || size === 'md') {
return '[&_.status]:w-3 [&_.status]:h-3 [&_.status]:border-2';
}
return '[&_.status]:w-4 [&_.status]:h-4 [&_.status]:border-2';
};

export default getStatusSize;
22 changes: 22 additions & 0 deletions workspaces/core/src/avatar/private/utils/getWrapperSize.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type SizeProps from '../types/SizeProps';

const getWrapperSize = (size?: SizeProps) => {
if (size === 'xs') {
return 'h-6 w-6 text-moon-10-caption';
}
if (size === 'sm') {
return 'h-8 w-8 text-moon-12';
}
if (size === 'md') {
return 'h-10 w-10 text-moon-14';
}
if (size === 'lg') {
return 'h-12 w-12 text-moon-16';
}
if (size === 'xl') {
return 'h-14 w-14 text-moon-16';
}
return 'h-16 w-16 text-moon-20';
};

export default getWrapperSize;

0 comments on commit 1c0296d

Please sign in to comment.