Skip to content
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

docs: fix useAnimatedKeyboard page crash #6056

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions docs/docs/device/useAnimatedKeyboard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,9 @@ Hook `useAnimatedKeyboard` returns an object containing these fields:

import useBaseUrl from '@docusaurus/useBaseUrl';
import AnimatedKeyboardSrc from '!!raw-loader!@site/src/examples/AnimatedKeyboard';
import AnimatedKeyboard from '@site/src/examples/AnimatedKeyboardVideoComponent';
patrycjakalinska marked this conversation as resolved.
Show resolved Hide resolved

<InteractiveExample
src={AnimatedKeyboardSrc}
component={
<ThemedVideo
center
width={300}
sources={{
light: '/recordings/useAnimatedKeyboard_light.mov',
dark: '/recordings/useAnimatedKeyboard_dark.mov',
}}
/>
}
/>
<InteractiveExample src={AnimatedKeyboardSrc} component={AnimatedKeyboard} />

## Remarks

Expand Down
15 changes: 15 additions & 0 deletions docs/src/examples/AnimatedKeyboardVideoComponent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';
import ThemedVideo from '../components/ThemedVideo';

const App: React.FC<{ width?: number }> = () => (
patrycjakalinska marked this conversation as resolved.
Show resolved Hide resolved
<ThemedVideo
center
width={300}
sources={{
light: '/recordings/useAnimatedKeyboard_light.mov',
dark: '/recordings/useAnimatedKeyboard_dark.mov',
}}
/>
);

export default App;
patrycjakalinska marked this conversation as resolved.
Show resolved Hide resolved
Loading