File tree Expand file tree Collapse file tree 3 files changed +61
-2
lines changed Expand file tree Collapse file tree 3 files changed +61
-2
lines changed Original file line number Diff line number Diff line change 1+ @file:JsModule(" react-share" )
2+ @file:JsNonModule
3+
4+ import react.ComponentClass
5+ import react.Props
6+
7+ @JsName(" EmailIcon" )
8+ external val EmailIcon : ComponentClass <IconProps >
9+
10+ @JsName(" EmailShareButton" )
11+ external val EmailShareButton : ComponentClass <ShareButtonProps >
12+
13+ @JsName(" TelegramIcon" )
14+ external val TelegramIcon : ComponentClass <IconProps >
15+
16+ @JsName(" TelegramShareButton" )
17+ external val TelegramShareButton : ComponentClass <ShareButtonProps >
18+
19+ external interface ShareButtonProps : Props {
20+ var url: String
21+ }
22+
23+ external interface IconProps : Props {
24+ var size: Int
25+ var round: Boolean
26+ }
Original file line number Diff line number Diff line change 1+ @file:JsModule(" react-player" )
2+ @file:JsNonModule
3+
4+ import react.*
5+
6+ @JsName(" default" )
7+ external val ReactPlayer : ComponentClass <ReactPlayerProps >
8+
9+ external interface ReactPlayerProps : Props {
10+ var url: String
11+ var controls: Boolean
12+ }
Original file line number Diff line number Diff line change @@ -36,8 +36,29 @@ val VideoPlayer = FC<VideoPlayerProps> { props ->
3636 + " Mark as unwatched"
3737 }
3838 }
39- img {
40- src = " https://via.placeholder.com/640x360.png?text=Video+Player+Placeholder"
39+ div {
40+ css {
41+ display = Display .flex
42+ marginBottom = 10 .px
43+ }
44+ EmailShareButton {
45+ url = props.video.videoUrl
46+ EmailIcon {
47+ size = 32
48+ round = true
49+ }
50+ }
51+ TelegramShareButton {
52+ url = props.video.videoUrl
53+ TelegramIcon {
54+ size = 32
55+ round = true
56+ }
57+ }
58+ }
59+ ReactPlayer {
60+ url = props.video.videoUrl
61+ controls = true
4162 }
4263 }
4364}
You can’t perform that action at this time.
0 commit comments