Allow img as children for avatar

old
Javi Velasco 2015-11-27 18:32:19 +01:00
parent 4affcc8636
commit bf68c83ea7
2 changed files with 8 additions and 3 deletions

View File

@ -3,8 +3,8 @@
.avatar {
width: $avatar-size;
background-color: $avatar-background;
height: $avatar-size;
background-color: $avatar-background;
overflow: hidden;
border-radius: 50%;
position: relative;
@ -16,6 +16,10 @@
height: $avatar-size;
fill: currentColor;
}
> img {
max-width: 100%;
height: auto;
}
}
.image {

View File

@ -5,10 +5,11 @@ import GithubIcon from './github_icon';
const AvatarTest = () => (
<section>
<h5>Avatars</h5>
<Avatar image={"https://placeimg.com/80/80/animals"} />
<Avatar title="Javier Velasco" image={"https://javivelasco.com/avatar404"} />
<Avatar image="https://placeimg.com/80/80/animals" />
<Avatar title="Javier Velasco" image="https://javivelasco.com/avatar404" />
<Avatar icon="folder" />
<Avatar><GithubIcon /></Avatar>
<Avatar><img src="https://placeimg.com/80/80/animals" /></Avatar>
</section>
);