forked from ant-design/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: enable react/prefer-stateless-function
- Loading branch information
Showing
9 changed files
with
160 additions
and
177 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
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 |
---|---|---|
@@ -1,20 +1,18 @@ | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
|
||
export default class Group extends React.Component { | ||
static propTypes = { | ||
children: React.PropTypes.any, | ||
} | ||
|
||
render() { | ||
const className = classNames({ | ||
'ant-input-group': true, | ||
[this.props.className]: !!this.props.className, | ||
}); | ||
return ( | ||
<span className={className} style={this.props.style}> | ||
{this.props.children} | ||
</span> | ||
); | ||
} | ||
export default function Group(props) { | ||
const className = classNames({ | ||
'ant-input-group': true, | ||
[props.className]: !!props.className, | ||
}); | ||
return ( | ||
<span className={className} style={props.style}> | ||
{props.children} | ||
</span> | ||
); | ||
} | ||
|
||
Group.propTypes = { | ||
children: React.PropTypes.any, | ||
}; |
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
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
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 |
---|---|---|
@@ -1,21 +1,18 @@ | ||
import React from 'react'; | ||
import SublimeVideo from 'react-sublime-video'; | ||
|
||
export default class VideoPlayer extends React.Component { | ||
render() { | ||
const video = this.props.video; | ||
const { alt, description, src } = video; | ||
const videoClassName = video.class; | ||
export default function VideoPlayer({ video }) { | ||
const { alt, description, src } = video; | ||
const videoClassName = video.class; | ||
|
||
return ( | ||
<div className={`preview-image-box ${videoClassName}`}> | ||
<div className={'preview-image-wrapper'}> | ||
<SublimeVideo src={src} type="video/mp4" /> | ||
</div> | ||
<div className="preview-image-title">{alt}</div> | ||
<div className="preview-image-description" | ||
dangerouslySetInnerHTML={{ __html: description }} /> | ||
return ( | ||
<div className={`preview-image-box ${videoClassName}`}> | ||
<div className={'preview-image-wrapper'}> | ||
<SublimeVideo src={src} type="video/mp4" /> | ||
</div> | ||
); | ||
} | ||
<div className="preview-image-title">{alt}</div> | ||
<div className="preview-image-description" | ||
dangerouslySetInnerHTML={{ __html: description }} /> | ||
</div> | ||
); | ||
} |