Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cria pagina de login issue #240 #301

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
EdiltonOliveira marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
EdiltonOliveira marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions src/layouts/app/pages/Login/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { Component } from 'pet-dex-utilities';
import LoginForm from '../../../../components/LoginForm';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Não dava para usar o Path Aliases aqui?
image

import petdexLogo from './images/petdex-logo__login-page.png';
import petAndDog from './images/pet-and-dog__login-page.png';
import './index.scss';

const html = `
<div data-select="container" class="login-page">
<div class="login-page__img-box">
<div class="login-page__img-top">
<img src="${petdexLogo}" class="login-page__img-logopetdex"/>
</div>
<div class="login-page__img-down">
<img src="${petAndDog}" class="login-page__img-petanddog"/>
Comment on lines +9 to +14
Copy link
Contributor

@Frompaje Frompaje Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bota o kebab no logo-petdex
ex:

class="login-page__img-logo-petdex

</div>

</div>
<div class=login-page__login-box>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ta sem eslint configurado? pq acho que ele ja evita esses espacos e ajusta a identacao, qualquer duvida liga nois pra configurar.

<div class="login-page__login-form">
</div>
</div>

</div>
`;
Comment on lines +7 to +25
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arrumar a identação

export default function LoginPage() {
Component.call(this, { html });

const $container = this.selected.get('container');
this.LoginForm = new LoginForm();
this.LoginForm.mount($container);
}

LoginPage.prototype = Object.assign(LoginPage.prototype, Component.prototype);
38 changes: 38 additions & 0 deletions src/layouts/app/pages/Login/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@use '~styles/colors.scss' as colors;
@use '~styles/breakpoints.scss' as breakpoints;

.login-page {
width: 100%;

display: flex;
gap: 5rem;

justify-content: center;

padding: 15rem;

background-color: colors.$primary600;
}

.login-page__img-box {
display: flex;
flex-direction: column;

align-items: center;
}

.login-page__img-box img {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

não usar tags no css

display: block;

padding-right: 2rem;
}

.login-page__img-logopetdex {
width: 15.5rem;
}

.login-page__img-top {
width: 100%;

margin-bottom: 10rem;
}
15 changes: 15 additions & 0 deletions src/stories/Login.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import LoginPage from '../layouts/app/pages/Login';

export default {
title: 'Pages/Login',
render: () => {
const loginPage = new LoginPage();
const $container = document.createElement('div');

loginPage.mount($container);

return $container;
},
};

export const LoginPageStoryPage = {};
Loading