Skip to content

Commit

Permalink
fix: pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaam committed Jul 26, 2024
1 parent 271e399 commit 5ebcda3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
31 changes: 13 additions & 18 deletions src/components/AddPet/index.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
import { Component } from 'pet-dex-utilities';
import './index.scss';

import Sliding from '../Sliding';
import ProgressBar from '../ProgressBar';

import PetVetPage from '../../layouts/app/pages/PetVet';
import PetWeight from '../../layouts/app/pages/PetWeight';
import PetRegister from '../../layouts/app/pages/PetRegister';

import arrowLeft from './assets/arrow-left.svg';
import akita from './assets/akita.svg';
import Sliding from '../Sliding';
import ProgressBar from '../ProgressBar';

const cards = [
{
title: 'Akita',
imgSrc: akita,
imgAlt: 'akita',
},
];
import './index.scss';

const cards = [];

const steps = new Map();
steps.set(1, 'Petraça');
Expand Down Expand Up @@ -59,7 +56,6 @@ export default function AddPet() {
const $previousStep = this.selected.get('previous-step');
this.$stepsName = this.selected.get('step-name');
this.$firstStep = this.selected.get('first-step');
this.$lastStep = this.selected.get('last-step');

this.progressBar = new ProgressBar(1, pages.length, 1);
this.progressBar.selected
Expand Down Expand Up @@ -89,22 +85,21 @@ export default function AddPet() {
}

AddPet.prototype = Object.assign(AddPet.prototype, Component.prototype, {
updateStep(actualStep, endingStep) {
updateStep(actualStep) {
this.actualStep = actualStep;
this.$stepsName = steps.get(actualStep);
this.$firstStep.textContent = actualStep;
this.$lastStep.textContent = endingStep;
},
nextStep(actualStep, endingStep) {
nextStep(actualStep) {
this.sliding.next();
this.progressBar.next();
this.updateStep(actualStep + 1, endingStep);
this.updateStep(actualStep + 1);
},
backStep(actualStep, endingStep) {
backStep(actualStep) {
if (this.sliding.slideIndex >= 1) {
this.sliding.previous();
this.progressBar.prev();
this.updateStep(actualStep - 1, endingStep);
this.updateStep(actualStep - 1);
}
},
});
6 changes: 3 additions & 3 deletions src/components/AddPet/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

&__title {
font-family: fonts.$sixthFont;
font-size: 1.6rem;
font-size: fonts.$sm;
font-weight: fonts.$semiBold;
}

Expand All @@ -39,7 +39,7 @@

font-family: fonts.$fourthFont;
color: colors.$gray800;
font-size: 1.6rem;
font-size: fonts.$sm;
font-weight: fonts.$regular;
line-height: 1.6;

Expand Down Expand Up @@ -78,7 +78,7 @@
}

&__subtitle {
font-size: 1.6rem;
font-size: fonts.$sm;
font-weight: fonts.$regular;
}
}
Expand Down

0 comments on commit 5ebcda3

Please sign in to comment.