Skip to content

Compound KeyboardToolbar component #1121

@kirillzyusko

Description

@kirillzyusko

Is your feature request related to a problem? Please describe.

The current KeyboardToolbar component slowly moves into a mess - we have a lot of props on root level and it's hard to read if you use all props simultaneously...

Describe the solution you'd like

I'd like to propose next design:

<KeyboardToolbar.Group name="my-form"> // ... <KeyboardToolbar> <KeyboardToolbar.Blur><MyCustomBlurView /></KeyboardToolbar.Blur> <KeyboardToolbar.Next /> <KeyboardToolbar.Prev /> <KeyboardToolbar.Content /> <KeyboardToolbar.Done /> </KeyboardToolbar>

Describe alternatives you've considered

I've been thinking about this design too, but I think it'll be hard to detect type property and will make internal component even more complex?..

<KeyboardToolbar> <KeyboardToolbar.Blur><MyCustomBlurView /></KeyboardToolbar.Blur> <KeyboardToolbar.Button type="prev" /> <KeyboardToolbar.Button type="next" /> <KeyboardToolbar.Content /> <KeyboardToolbar.Button type="done" /> </KeyboardToolbar>

Additional context

We just need to make this refactor carefully to be sure that all cases can be covered by a new implementation 🙂

Metadata

Metadata

Assignees

Labels

KeyboardToolbarAnything related to KeyboardToolbar componentenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions