-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: swap goku/gohan in Alert, Avatar, AuthCode, BottomSheet [MDS-688]
- Loading branch information
Showing
5 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
workspaces/core/src/avatar/private/utils/getBorderRadius.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
13 changes: 13 additions & 0 deletions
13
workspaces/core/src/avatar/private/utils/getStatusDeprecatedSize.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
22
workspaces/core/src/avatar/private/utils/getWrapperSize.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |