Skip to content

Commit

Permalink
feat: create pet avatar component
Browse files Browse the repository at this point in the history
  • Loading branch information
nathalia-84 committed Jul 8, 2024
1 parent 243bc2b commit 2c137ac
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
11 changes: 5 additions & 6 deletions src/components/PetAvatar/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
text-decoration: none;
aspect-ratio: 1/1;

opacity: 0.85;

transition: 0.3s ease-in-out;

&__img {
height: 100%;

Expand All @@ -28,8 +32,6 @@
}

&__title {
overflow: hidden;

font-family: fonts.$fourthFont;

color: colors.$gray200;
Expand All @@ -47,9 +49,6 @@

&:hover {
transform: scale(1.02);
}

&:not(:hover) {
opacity: 0.9;
opacity: 1;
}
}
4 changes: 2 additions & 2 deletions src/layouts/app/components/SideMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import meusPets from './images/meuspets.svg';
import notificacoes from './images/notifications.svg';
import perfil from './images/perfil.svg';
import petdex from './images/petdex.svg';
import './index.scss';
import PetAvatar from '../../../../components/PetAvatar';
import './index.scss';

const html = `
<nav class="side-menu-nav">
Expand All @@ -28,7 +28,7 @@ const html = `
<div class="side-menu-content__line"></div>
<div class="side-menu-content__yourpet">
<h2 class="side-menu-content__title-yourpet">Seu Pet</h2>
<div class="side-menu-content__avatar-yourpet" data-select="avatar-container"></div>
<div class="side-menu-content__avatars-yourpet" data-select="avatar-container"></div>
</div>
<div class="side-menu-content__line"></div>
<div class="side-menu-content__itens" alt="itens-um">
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/app/components/SideMenu/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
font-style: fonts.$normal;
}

&__avatar-yourpet {
&__avatars-yourpet {
display: grid;
grid-template-columns: repeat(3, 6rem);
grid-gap: 2rem;
Expand Down
4 changes: 3 additions & 1 deletion src/stories/PetAvatar.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ export default {
title: 'Components/PetAvatar',
render: (args) => {
const $container = document.createElement('div');
$container.style.width = '6rem';
$container.style.width = '60px';
$container.style.height = '90px';
$container.style.overflow = 'visible';
const petAvatar = new PetAvatar(args);
petAvatar.mount($container);

Expand Down

0 comments on commit 2c137ac

Please sign in to comment.