-
Notifications
You must be signed in to change notification settings - Fork 151
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
fix(blade): chipgroup grid alignment #2536
Open
tewarig
wants to merge
29
commits into
master
Choose a base branch
from
fix/chipgroup-grid-alignment
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
39da608
chore: expose grid and flexbox props
tewarig 67b9d5f
fix: add changeset
tewarig fb84e53
chore: update lint error
tewarig 2481620
feat: add width prop in chip
tewarig 1e89e97
feat: let user change the layout
tewarig 72efaeb
chore: remove unsed commit types
tewarig 18838c7
chore: review changes
tewarig 464acc8
chore: update snap
tewarig f280c95
chore: removed unused utils
tewarig 98296fb
chore: remove types
tewarig 7c9803a
chore: update ts
tewarig f3633f3
chore: review change
tewarig a818274
chore: update snap
tewarig dc6fa5a
chore : review change
tewarig 23ee578
chore: review changes
tewarig f4652cb
chore: addMaxWidth , minWidth
tewarig bb40a3f
chore: expose maxWidth , minWidth
tewarig 62f74c1
chore: update chipgroup width
tewarig 2a32ed1
chore: more refactor
tewarig a1f66f9
chore: update snap
tewarig c02f1e9
chore: chipgroup custom layout
tewarig 1836fdc
chore: change to getBaseBoxStyles
tewarig 8adc366
chore: refactor width
tewarig 3443de8
chore: refactor
tewarig 1774421
chore: more changes
tewarig 833b335
chore: snap update
tewarig 4be16b6
chore: change to width 100%
tewarig bf73016
chore: update snaps
tewarig eee166f
chore: review changes
tewarig 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 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,5 @@ | ||
--- | ||
'@razorpay/blade': patch | ||
--- | ||
|
||
fix(blade): allow consumers to align chips in chipgroup |
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
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
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import React from 'react'; | ||
import { chipGroupGapTokens, chipGroupLabelSizeTokens } from './chipTokens'; | ||
import { chipGroupLabelSizeTokens, chipGroupGapTokens } from './chipTokens'; | ||
import { ChipGroupProvider } from './ChipGroupContext'; | ||
import { useChipGroup } from './useChipGroup'; | ||
import type { ChipGroupProps } from './types'; | ||
|
@@ -96,18 +96,15 @@ const _ChipGroup = ( | |
<VisuallyHidden> | ||
<Text>{accessibilityLabel}</Text> | ||
</VisuallyHidden> | ||
<BaseBox display="flex" flexDirection="row" flexWrap="wrap"> | ||
{React.Children.map(children, (child, index) => { | ||
return ( | ||
<BaseBox | ||
key={index} | ||
marginBottom={chipGroupGapTokens[size].bottom} | ||
marginRight={chipGroupGapTokens[size].right} | ||
> | ||
{child} | ||
</BaseBox> | ||
); | ||
})} | ||
<BaseBox | ||
display="flex" | ||
flexDirection="row" | ||
flexWrap="wrap" | ||
rowGap={chipGroupGapTokens[size].bottom} | ||
columnGap={chipGroupGapTokens[size].right} | ||
marginBottom={chipGroupGapTokens[size].bottom} | ||
> | ||
{children} | ||
Comment on lines
-99
to
+107
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. nice 🏅 |
||
</BaseBox> | ||
<FormHint | ||
size={chipGroupLabelSizeTokens[size]} | ||
|
Oops, something went wrong.
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.
what is chipGroupContainerLayout?