Skip to content

Commit 5bc2cea

Browse files
authored
fix: KeyboardToolbar view props inheritance (#608)
## 📜 Description Minor tweaks to `KeyboardToolbar` view props inheritance coming from this PR #603 ## 💡 Motivation and Context I wanted to unify documentation style. On JS side we should do spreading first, because otherwise unspecified props can overwrite our props and it may lead to unpredictable behavior. ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### JS - spread `rest` before specifying other props (because in props declaration we omit props that we use); ### Docs - unify props inheritance style across documentation style. ## 🤔 How Has This Been Tested? Tested manually on localhost:3000. ## 📸 Screenshots (if appropriate): <img width="1423" alt="image" src="https://github.com/user-attachments/assets/4cb3f44c-129b-43e1-a0bf-eeeac7568491"> ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
1 parent 92d6cee commit 5bc2cea

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/docs/api/components/keyboard-toolbar/index.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ import toolbar from "./toolbar.lottie.json";
4040

4141
## Props
4242

43-
Inherits [all props from the react-native View component](https://reactnative.dev/docs/view#props).
43+
### [`View Props`](https://reactnative.dev/docs/view#props)
44+
45+
Inherits [View Props](https://reactnative.dev/docs/view#props).
4446

4547
### `button`
4648

src/components/KeyboardToolbar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const KeyboardToolbar: React.FC<KeyboardToolbarProps> = ({
150150

151151
return (
152152
<KeyboardStickyView offset={offset}>
153-
<View style={toolbarStyle} testID={TEST_ID_KEYBOARD_TOOLBAR} {...rest}>
153+
<View {...rest} style={toolbarStyle} testID={TEST_ID_KEYBOARD_TOOLBAR}>
154154
{blur}
155155
{showArrows && (
156156
<>

0 commit comments

Comments
 (0)