forked from react-bootstrap/react-bootstrap
-
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.
Merge pull request react-bootstrap#1349 from AlexKVal/liftup
v0.26-rc liftup
- Loading branch information
Showing
92 changed files
with
881 additions
and
752 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const imageResponsiveInstance = ( | ||
<Image src="/assets/thumbnail.png" responsive /> | ||
); | ||
|
||
React.render(imageResponsiveInstance, mountNode); |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const imageShapeInstance = ( | ||
<Grid> | ||
<Row> | ||
<Col xs={6} md={4}> | ||
<Image src="/assets/thumbnail.png" rounded /> | ||
</Col> | ||
<Col xs={6} md={4}> | ||
<Image src="/assets/thumbnail.png" circle /> | ||
</Col> | ||
<Col xs={6} md={4}> | ||
<Image src="/assets/thumbnail.png" thumbnail /> | ||
</Col> | ||
</Row> | ||
</Grid> | ||
); | ||
|
||
React.render(imageShapeInstance, mountNode); |
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
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
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
|
||
const Image = React.createClass({ | ||
|
||
propTypes: { | ||
|
||
/** | ||
* Sets image as responsive image | ||
*/ | ||
responsive: React.PropTypes.bool, | ||
|
||
/** | ||
* Sets image shape as rounded | ||
*/ | ||
rounded: React.PropTypes.bool, | ||
|
||
/** | ||
* Sets image shape as circle | ||
*/ | ||
circle: React.PropTypes.bool, | ||
|
||
/** | ||
* Sets image shape as thumbnail | ||
*/ | ||
thumbnail: React.PropTypes.bool | ||
}, | ||
|
||
getDefaultProps() { | ||
return { | ||
responsive: false, | ||
rounded: false, | ||
circle: false, | ||
thumbnail: false | ||
}; | ||
}, | ||
|
||
render() { | ||
const classes = { | ||
'img-responsive': this.props.responsive, | ||
'img-rounded': this.props.rounded, | ||
'img-circle': this.props.circle, | ||
'img-thumbnail': this.props.thumbnail | ||
}; | ||
|
||
return ( | ||
<img {...this.props} className={classNames(this.props.className, classes)} /> | ||
); | ||
} | ||
}); | ||
|
||
export default Image; |
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
Oops, something went wrong.