Skip to content
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

feat: pass buttons' props separately to FrameButtonContainer #499

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

stephancill
Copy link
Contributor

Change Summary

Passes button props alongside the button elements to the FrameButtonContainer component in case the props need to be transformed or reordered at render time.

Merge Checklist

  • PR has a Changeset
  • PR includes documentation if necessary
  • PR updates the boilerplates if necessary

Copy link

vercel bot commented Sep 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frames-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 25, 2024 10:11am
framesjs-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 25, 2024 10:11am
framesjs-examples ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 25, 2024 10:11am

theme?.Button || ({} as TStylingProps)
)
),
buttonsProps: buttonsProps,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit pick - shorthand here 😄

@@ -259,40 +287,19 @@ export function BaseFrameUI<TStylingProps extends Record<string, unknown>>({
buttonsContainer:
frameUiState.status === "loading" ||
!frameUiState.frame.buttons ||
frameUiState.frame.buttons.length === 0
frameUiState.frame.buttons.length === 0 ||
!buttonsProps

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the conditions are pretty much the same here, could just do with a buttonProps && components....?

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 this pull request may close these issues.

3 participants