UnBArqDsw2021-1 / 2021.1_G02_TaNaMesa_Frontend

GNU General Public License v3.0
0 stars 0 forks source link

Criando componentes iniciais #18

Closed emysdias closed 3 years ago

emysdias commented 3 years ago

Issue

5

Descrição

Issue destinada a criação de componentes simples muito utilizados no projeto (de acordo com o protótipo de alta fidelidade)

Screenshots (Se houver necessidade):

image image image

menos os botões do menu lateral

Checklist:

Como validar?

Estão todos na index mas o modal da pra testar assim no arquivo de index na pasta pages:

import React, { useState } from 'react';
import { useTheme } from 'styled-components';
import Modal from '../../components/Modal/LoginModal/index';
const Home: React.FC = () => {
  // const { switchTheme } = useUserTheme();
  const theme = useTheme();
  const [modalOpen, setModalOpen] = useState(false);
  const onCloseModal = (event: any) => {
    event.preventDefault();
    setModalOpen(false);
  };
return (
    <Container>
      <h1>Tá na Mesa</h1>
      <Modal title="Login" visible={modalOpen} onClose={onCloseModal} />
      {/* <button type="button" onClick={switchTheme}>
        Trocar tema
      </button> */}
      <button type="button" onClick={() => setModalOpen(true)}>
        Abrir modal
      </button>

      <h4>{theme.type}</h4>
    </Container>
  );
};
netlify[bot] commented 3 years ago

✔️ Deploy Preview for tanamesa ready!

🔨 Explore the source changes: ff796365831a28930586d0077bb64ec41b42ee17

🔍 Inspect the deploy log: https://app.netlify.com/sites/tanamesa/deploys/6144c6af71740f0007c4f86b

😎 Browse the preview: https://deploy-preview-18--tanamesa.netlify.app/