How to change size prop of Button componet based on screen size? Is there a way?
Unanswered
Pollock posted this in #help-forum
PollockOP
That's it
3 Replies
Miniature Pinscher
You could add an event listener to the window and update the state of the prop you're meaning to be reactive to the viewport's width.
But to be more inline with SSR, I'd create two separate Buttons and hide/show them using css media queries.
@Miniature Pinscher But to be more inline with SSR, I'd create two separate Buttons and hide/show them using css media queries.
PollockOP
Sometimes these simple methods just slip my mind.. thanks