[Feature] Allow passing custom props to button

Open
#136 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
react, typescript
Domain
devtools, frontend

Research direction

The issue does not name a file or test. Start by locating the React Hook Form devtools button and compare its props surface with the React Query example shown in the report. Done means callers can pass custom className and style values to reposition or restyle the button.

Written by the indexing model from the issue text.

Description

feature request

With the react-query devtools I can pass in custom props to make adjustments to it. In particular, it's good to be able to pass a className or a custom style to override some defaults, like done here:

<ReactQueryDevtools
  position="bottom-left"
  toggleButtonProps={{
    className: 'noPrint',
    style: { transform: 'translateY(-3rem)' },
  }}
  panelProps={{
    className: 'noPrint',
  }}
/>

None of the placements of the react-hook-form devtools button work for me as there are fixed toolbars at the top and the bottom of our app. So I need to be able to pass in a transform to nudge it upwards, like I am able to with the react-query devtools.

Dominant language
TypeScript
Stars
670
Forks
55
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from react-hook-form/devtools

All issues in react-hook-form/devtools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.