BoxControl: Add ability to render custom icon to represent sides#25297
Closed
ItsJonQ wants to merge 1 commit into
Closed
BoxControl: Add ability to render custom icon to represent sides#25297ItsJonQ wants to merge 1 commit into
ItsJonQ wants to merge 1 commit into
Conversation
This update enhances the BoxControl component to allow for the ability to render a custom icon (a `React.Component`) to represent the selected side. This provides the opportunity for folks to adjust the UI for the icon if they choose to use `BoxControl` for purposes beyond `padding` (the current default implementation).
|
Size Change: +18 B (0%) Total Size: 1.2 MB
ℹ️ View Unchanged
|
Contributor
|
@ItsJonQ Greeeat stuff! Will be checking this out tomorrow |
Contributor
|
@ItsJonQ tested in my local project and works well! Extra options that would be cool in the future (for dealing with corners/radius, for example):
I'd be using this today if could (I might try to copy it over into my project, but looks like there are a lot of dependencies), thanks ! |
Contributor
|
Another couple of possible improvements for further down the line:
|
Contributor
|
I started implementing this the other day only to discover it still hasn't made it into release :( |
Contributor
|
I'm going to close out this PR due to inactivity. If you'd like to pick up this work though @rmorse, that would be awesome! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
(GIF above shows the BoxControl icon being rendered with a custom icon (emojis) that represent the selected side)
This update enhances the BoxControl component to allow for the ability to render a custom icon (a
React.Component) to represent the selected side. This provides the opportunity for folks to adjust the UI for the icon if they choose to useBoxControlfor purposes beyondpadding(the current default implementation).This idea was originally mentioned here:
#21492
cc'ing @rmorse
How has this been tested?
Easiest way to test right now...
npm run storybook:devTypes of changes
iconComponentprop to<BoxControl />for custom icon renderingChecklist: