-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/#64 component feat #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7bb8bcf
Feat: #64 LNB μ λλ©μ΄μ
μΆκ°
yiyoonseo 2fd43b7
Feat: #64 ν¬λ λ§ λΌμ°ν
μ°λ
yiyoonseo bd01a07
Mod: Toast shadow λ³κ²½ to cardshadow
yiyoonseo 4b4a671
Feat: #64 LNB μ°μΈ‘ 보λ μΆκ°
yiyoonseo 49cb37b
Feat: #64 μ΄λ©μΌ μμ΄μ½ μΆκ° λ° μ μ©
yiyoonseo 06a39f8
Mod: #64 μμ μ»΄ν¬λνΈ μμ
yiyoonseo 1d3e048
Feat: #64 CLOSE_S μΆκ°
yiyoonseo 3624daa
Mod: #64 Business Footer μμ
yiyoonseo dd24f6f
Mod: #64 ν€λ, νΈν° μμ λ° μ€λ₯ 볡ꡬ
yiyoonseo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ type IconOnlyButtonTone = "light" | "dark"; | |
| interface IconOnlyButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { | ||
| iconType?: IconType; | ||
| tone?: IconOnlyButtonTone; | ||
| size?: "default" | "small"; | ||
| } | ||
|
|
||
| const toneStyles: Record<IconOnlyButtonTone, string> = { | ||
|
|
@@ -20,8 +21,10 @@ export default function IconOnlyButton({ | |
| tone = "light", | ||
| className, | ||
| type = "button", | ||
| size = "default", | ||
| ...buttonProps | ||
| }: IconOnlyButtonProps) { | ||
| const closeIconType = size === "small" ? "CLOSE_S" : "CLOSE_M"; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Line 42 always renders Proposed fix- const closeIconType = size === "small" ? "CLOSE_S" : "CLOSE_M";
+ const resolvedIconType =
+ size === "small" && iconType === "CLOSE_M" ? "CLOSE_S" : iconType;
@@
- <Icon
- type={closeIconType}
- className={
- (clsx("shrink-0 "), size === "small" ? "h-5 w-5" : "h-6 w-6")
- }
- />
+ <Icon
+ type={resolvedIconType}
+ className={clsx("shrink-0", size === "small" ? "h-5 w-5" : "h-6 w-6")}
+ />Also applies to: 41-45 π€ Prompt for AI Agents |
||
| return ( | ||
| <button | ||
| type={type} | ||
|
|
@@ -31,10 +34,16 @@ export default function IconOnlyButton({ | |
| buttonProps.disabled ? "cursor-not-allowed" : "cursor-pointer", | ||
| toneStyles[tone], | ||
| className, | ||
| size === "small" ? "h-6 w-6" : "h-10 w-10", | ||
| )} | ||
| {...buttonProps} | ||
| > | ||
| <Icon type={iconType} className="h-6 w-6 shrink-0" /> | ||
| <Icon | ||
| type={closeIconType} | ||
| className={ | ||
| (clsx("shrink-0 "), size === "small" ? "h-5 w-5" : "h-6 w-6") | ||
| } | ||
| /> | ||
| </button> | ||
| ); | ||
| } | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small variant sizing is internally inconsistent.
Line 31 keeps fixed
p-2.5and Line 41 keeps a fixedh-6 w-6icon, while Line 35 can shrink the button toh-6 w-6. The small button ends up with no real content room, so icon rendering/layout is unstable.Proposed fix
className={clsx( - "flex items-center justify-center gap-2.5 rounded-icon-round bg-bg-white p-2.5", + "flex items-center justify-center gap-2.5 rounded-icon-round bg-bg-white", buttonProps.disabled ? "cursor-not-allowed" : "cursor-pointer", active ? "text-icon-neutral-heavy" : "text-icon-neutral-assistive", className, - size === "small" ? "h-6 w-6" : "h-10 w-10", + size === "small" ? "h-6 w-6 p-1" : "h-10 w-10 p-2", )} {...buttonProps} > <Icon type={directionIconType[direction]} - className="aspect-square h-6 w-6 shrink-0" + className={clsx( + "aspect-square shrink-0", + size === "small" ? "h-4 w-4" : "h-6 w-6", + )} />Also applies to: 39-41
π€ Prompt for AI Agents