Skip to content

Commit

Permalink
docs: tsx for button
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Feb 12, 2024
1 parent a842dc4 commit 27251a4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions docs/docs/api/components/keyboard-toolbar/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,21 @@ import toolbar from "./toolbar.lottie.json";

This property allows to render custom touchable component for next, previous and done button.

```
```tsx
import { TouchableOpacity } from "react-native-gesture-handler";
import { KeyboardToolbar, KeyboardToolbarProps } from "react-native-keyboard-controller";
import {
KeyboardToolbar,
KeyboardToolbarProps,
} from "react-native-keyboard-controller";

const CustomButton: KeyboardToolbarProps["button"] = ({
children,
onPress,
}) => (
<TouchableOpacity onPress={onPress}>
{children}
</TouchableOpacity>
);
}) => <TouchableOpacity onPress={onPress}>{children}</TouchableOpacity>;

// ...

<KeyboardToolbar button={CustomButton} />
<KeyboardToolbar button={CustomButton} />;
```

### `content`
Expand Down

0 comments on commit 27251a4

Please sign in to comment.