1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-09-08 21:30:47 +02:00

feat: Add "is-pixelated" class for avatars with styles for all browsers

This commit is contained in:
besasam
2021-01-25 10:34:23 +01:00
parent 1e3e7996c5
commit 71974a186c
3 changed files with 19 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ import classNames from 'classnames';
export default () => {
const isRounded = boolean('is-rounded', false);
const isPixelated = boolean('is-pixelated', false);
const avatarSize = select('Avatar Classes', {
default: '',
'is-small': 'is-small',
@@ -15,12 +16,12 @@ export default () => {
avatarSize,
{
'is-rounded': isRounded,
'is-pixelated': isPixelated,
},
);
return `
<img src="http://www.gravatar.com/avatar?s=15" class="${avatarClasses}"
alt="Gravatar Image Example"
style="image-rendering: pixelated;">
alt="Gravatar Image Example">
`;
};