mirror of
https://github.com/yldio/copilot.git
synced 2024-12-29 05:10:05 +02:00
changing props name to be more consistant
This commit is contained in:
parent
7e85e17367
commit
54b9601d9c
@ -6,7 +6,7 @@ const styles = require('./style.css');
|
||||
|
||||
const Avatar = ({
|
||||
color,
|
||||
image,
|
||||
src,
|
||||
name,
|
||||
className,
|
||||
style
|
||||
@ -23,12 +23,12 @@ const Avatar = ({
|
||||
};
|
||||
|
||||
const fill = () => {
|
||||
if ( image ) {
|
||||
if ( src ) {
|
||||
return (
|
||||
<img
|
||||
alt={name}
|
||||
className={styles.picture}
|
||||
src={image}
|
||||
src={src}
|
||||
style={style}
|
||||
/>
|
||||
);
|
||||
@ -55,8 +55,8 @@ const Avatar = ({
|
||||
Avatar.propTypes = {
|
||||
className: React.PropTypes.string,
|
||||
color: React.PropTypes.string,
|
||||
image: React.PropTypes.string,
|
||||
name: React.PropTypes.string,
|
||||
src: React.PropTypes.string,
|
||||
style: React.PropTypes.object
|
||||
};
|
||||
|
||||
|
@ -19,7 +19,7 @@ nmodule.exports = ReactDOM.renderToString(
|
||||
<Avatar color='#35a8c0' name='Alex' />
|
||||
</Column>
|
||||
<Column>
|
||||
<Avatar color='#ef6176' name='Alex' image='https://openclipart.org/image/2400px/svg_to_png/177482/ProfilePlaceholderSuit.png' />
|
||||
<Avatar color='#ef6176' name='Alex' src='https://openclipart.org/image/2400px/svg_to_png/177482/ProfilePlaceholderSuit.png' />
|
||||
</Column>
|
||||
</Row>
|
||||
</Base>
|
||||
@ -35,7 +35,7 @@ const Avatar = require('ui/avatar');
|
||||
module.exports = () => {
|
||||
return (
|
||||
<Avatar color='#35a8c0' name='Alex' />
|
||||
<Avatar color='#ef6176' name='Alex' image='path/to/image.png' />
|
||||
<Avatar color='#ef6176' name='Alex' src='path/to/image.png' />
|
||||
);
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user