feat(design-system): create reusable helper function to support responsive styling [AR-53842]#338
Open
vpolessky-dn wants to merge 7 commits intodrivenets:mainfrom
Conversation
…n-to-support-responsive-styling
| children, | ||
| ...props | ||
| }) => { | ||
| const size = useResponsiveValue(sizeProp); |
Collaborator
There was a problem hiding this comment.
We rely on JS to choose the size based on the screen width. Using CSS media queries would be cheaper form performance standpoint.
I think useResponsiveValue hook is equivalent of MUI useMediaQuery and is usefull when you have some conditional rendering etc. We should expose it for library consumers.
If we want to follow MUI, then responsive props → generate CSS media queries. It may be hard, because it requires runtime css / css pre-processors. I'm not saying we 100% need it. I want to make sure we discuss this option and are on the same page.
iromanchuk-dn
requested changes
Mar 31, 2026
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.
No description provided.