-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: added an ability to show video demos (#437)
## 📜 Description Added an ability to show video as demo (before it was possible to show only lottie - but it was expensive in terms of creation). ## 💡 Motivation and Context Videos are much faster to create and upload/paste. So I decided to give a try and upload a first video for selection demo (I think when people are having visual reference - it's easier to understand how it works). ## 📢 Changelog ### Docs - added `Video` component; - started to use it in `useFocusedInputHandler` page; - corrected documentation for `useFocusedInputHandler` slightly. ## 🤔 How Has This Been Tested? Tested manually on `localhost:3000`. ## 📸 Screenshots (if appropriate): ![image](https://github.com/kirillzyusko/react-native-keyboard-controller/assets/22820318/bb521d2f-4b8a-4a0a-b55b-3802b317f55b) ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
- Loading branch information
1 parent
427c26c
commit 990574c
Showing
6 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,7 +107,8 @@ | |
"ccache", | ||
"ivar", | ||
"objc", | ||
"QWERT" | ||
"QWERT", | ||
"autoplayed" | ||
], | ||
"ignorePaths": [ | ||
"node_modules", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,7 @@ img[src$='.gif'], | |
.playwright { | ||
display: none; | ||
} | ||
/* Videos are autoplayed */ | ||
.video { | ||
display: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import useBaseUrl from "@docusaurus/useBaseUrl"; | ||
import React from "react"; | ||
|
||
type VideoProps = { | ||
src: string; | ||
width?: number; | ||
}; | ||
|
||
export default function Video({ src, width = 100, ...props }: VideoProps) { | ||
const source = useBaseUrl(src); | ||
|
||
return ( | ||
<div className="center video"> | ||
<video | ||
src={source} | ||
width={`${width}%`} | ||
height="100%" | ||
playsInline | ||
autoPlay | ||
muted | ||
loop | ||
{...props} | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.