I have a button that has dynamic width according to its content. When I put the word 'next' for example, it gets the size it should be, but when this button goes to the loading state and displays the spinner it adjusts to the size of the spinner. How can I solve this and leave it the size of the previous content?
<Container isDisabled={disabled} {...props}> {loading ? <Spinner /> : children}</Container>
I’m using styled components to style. The reference of the width is the child, I want to leave the 2 in the same size
Ideal size
Button in loading state that should be in the ideal size