Skip to content

Commit

Permalink
feat: rename containerStyle prop to style
Browse files Browse the repository at this point in the history
  • Loading branch information
karolisgrinkevicius committed Apr 27, 2022
1 parent 5026b0a commit 59fe216
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pnpm add react-youtube
id={string} // defaults -> ''
className={string} // defaults -> ''
iframeClassName={string} // defaults -> ''
containerStyle={object} // defaults -> {}
style={object} // defaults -> {}
title={string} // defaults -> ''
loading={string} // defaults -> undefined
opts={obj} // defaults -> {}
Expand Down
8 changes: 4 additions & 4 deletions packages/react-youtube/src/YouTube.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export type YouTubeProps = {
/**
* Custom style for the player container element
*/
containerStyle?: React.CSSProperties;
style?: React.CSSProperties;
/**
* Title of the video for the iframe's title tag.
*/
Expand Down Expand Up @@ -163,7 +163,7 @@ const defaultProps: YouTubeProps = {
id: '',
className: '',
iframeClassName: '',
containerStyle: {},
style: {},
title: '',
loading: undefined,
opts: {},
Expand All @@ -182,7 +182,7 @@ const propTypes = {
id: PropTypes.string,
className: PropTypes.string,
iframeClassName: PropTypes.string,
containerStyle: PropTypes.object,
style: PropTypes.object,
title: PropTypes.string,
loading: PropTypes.oneOf(['lazy', 'eager']),
opts: PropTypes.objectOf(PropTypes.any),
Expand Down Expand Up @@ -403,7 +403,7 @@ class YouTube extends React.Component<YouTubeProps> {

render() {
return (
<div className={this.props.className} style={this.props.containerStyle}>
<div className={this.props.className} style={this.props.style}>
<div id={this.props.id} className={this.props.iframeClassName} ref={this.refContainer} />
</div>
);
Expand Down

0 comments on commit 59fe216

Please sign in to comment.