cookpete / react-player

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
https://cookpete.github.io/react-player
MIT License
8.89k stars 1.12k forks source link

fix/display prop handling in render method #1741

Closed Ritika1828 closed 2 months ago

luwes commented 2 months ago

thanks but this is not a bug. it's a shorthand for display: display

Ritika1828 commented 2 months ago

if display is an object and if we are passing it as a prop it will be appending like object example - const display={ fontSize:"14px", bgColor:"red", }

const style = { width: '100%', height: '100%', display }

output will be { width: '100%', height: '100%', display: { name: 'Ritika', bgColor: 'red' } } which will not correctly applied to the styles that we are passing to div the correct should be by using spread operator in display while using it in style

luwes commented 2 months ago

this is display I believe https://developer.mozilla.org/en-US/docs/Web/CSS/display

Ritika1828 commented 2 months ago

can we pass more styles by passing any style props ?