-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#38 Append custom classname to video element
- Loading branch information
Showing
2 changed files
with
13 additions
and
1 deletion.
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
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
d573310
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this adds the className to the enclosing div instead of the video element itself. Also this works onlhy if the className is "custom-class". If I give my own className like "custom-video", it won't work.
d573310
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I want to set width and height of a video via a css class (instead of attributes width and height of the Video component), I can't.
d573310
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't just append 'custom-class', that is the demo, it can apply any class you provide via props. Why do you need a custom class on the video itself when you can target it
.custom-class .video__el { width: 100px; height: 100px }
.