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
Use v8 react-button hooks in v0 button #15777
Conversation
@@ -32,5 +32,8 @@ export const useButtonState = (draftState: ButtonState) => { | |||
} | |||
} | |||
|
|||
draftState.disabled = draftState['aria-disabled'] = draftState.disabled || draftState.loading; | |||
// TODO: v0 buttons are not disabled while loading, removed `disabled = loading` logic here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not disabling buttons while loading was intentional - while the UI is loading, it is useful to have the button still focused, because quite often, there is no other suitable place to move focus to.
|
||
export const renderImage = (state: ImageState) => { | ||
const { slots, slotProps } = getSlots(state); | ||
|
||
return <slots.root {...slotProps.root} />; | ||
}; | ||
|
||
const mergeProps = makeMergeProps<ImageState>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Add tests to show why we cannot rely on a static list of props to deeply merge.
@levithomason Guessing this can be closed now that we're taking a totally different approach? |
Closing since we're no longer considering this approach |
Validating v8 hooks in v0. Please wait for review.
TODO