Skip to content

Button text not showing in trekbag final-code #21

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

Open
peterdanwan opened this issue Apr 4, 2025 · 0 comments · May be fixed by #22
Open

Button text not showing in trekbag final-code #21

peterdanwan opened this issue Apr 4, 2025 · 0 comments · May be fixed by #22

Comments

@peterdanwan
Copy link

Hello! I noticed a potential issue within the final-code directory for trekbag:

The ButtonGroup component is not passing children to the Button component despite the Button component being written to accept the children prop (not the text prop):

<Button
key={button.text + button.onClick.toString()}
text={button.text}
onClick={button.onClick}
buttonType="secondary"
/>

This results in each Button's text not showing:
no-text

Adjusting the ButtonGroup component like so fixes the issue:

buttongroup-fix
buttongroup-shows

@peterdanwan peterdanwan linked a pull request Apr 4, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant