mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 14:10:04 +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 = ({
|
const Avatar = ({
|
||||||
color,
|
color,
|
||||||
image,
|
src,
|
||||||
name,
|
name,
|
||||||
className,
|
className,
|
||||||
style
|
style
|
||||||
@ -23,12 +23,12 @@ const Avatar = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const fill = () => {
|
const fill = () => {
|
||||||
if ( image ) {
|
if ( src ) {
|
||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
alt={name}
|
alt={name}
|
||||||
className={styles.picture}
|
className={styles.picture}
|
||||||
src={image}
|
src={src}
|
||||||
style={style}
|
style={style}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@ -55,8 +55,8 @@ const Avatar = ({
|
|||||||
Avatar.propTypes = {
|
Avatar.propTypes = {
|
||||||
className: React.PropTypes.string,
|
className: React.PropTypes.string,
|
||||||
color: React.PropTypes.string,
|
color: React.PropTypes.string,
|
||||||
image: React.PropTypes.string,
|
|
||||||
name: React.PropTypes.string,
|
name: React.PropTypes.string,
|
||||||
|
src: React.PropTypes.string,
|
||||||
style: React.PropTypes.object
|
style: React.PropTypes.object
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ nmodule.exports = ReactDOM.renderToString(
|
|||||||
<Avatar color='#35a8c0' name='Alex' />
|
<Avatar color='#35a8c0' name='Alex' />
|
||||||
</Column>
|
</Column>
|
||||||
<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>
|
</Column>
|
||||||
</Row>
|
</Row>
|
||||||
</Base>
|
</Base>
|
||||||
@ -35,7 +35,7 @@ const Avatar = require('ui/avatar');
|
|||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
return (
|
return (
|
||||||
<Avatar color='#35a8c0' name='Alex' />
|
<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