Skip to content

Instantly share code, notes, and snippets.

View jonathasborges1's full-sized avatar
🏠
Working from home

Jonathas Borges jonathasborges1

🏠
Working from home
View GitHub Profile
@jonathasborges1
jonathasborges1 / component.tsx
Created February 10, 2023 20:49
Exemplo default de componente React usando arrowFunctions
import React from 'react';
interface Props {
children?: React.ReactNode;
}
const Component: React.FC<Props> = ({ children, ...props }) => {
return (
<>{children}</>
)
@jonathasborges1
jonathasborges1 / rfx.code-snippets
Created February 10, 2023 20:49
Exemplo de Snippets usando react com arrow functions
"React Componet default ArrowFunction" : {
"prefix": "rfx",
"body" : [
"import React from 'react';\n",
"interface Props {",
"\tchildren?: React.ReactNode;",
"}\n",
"const Component: React.FC<Props> = ({ children, ...props }) => {",
"\treturn (",
"\t\t<>{children}</>",
@jonathasborges1
jonathasborges1 / index.tsx
Created February 1, 2023 15:57
Drawer - chidrenWithProps
import React from "react";
import { Box, Button, Drawer, DrawerProps } from "@material-ui/core";
import { createStyles, makeStyles, Theme } from "@material-ui/core/styles";
type Anchor = "top" | "left" | "bottom" | "right";
interface ButtomDrawer extends DrawerProps {
label: string;
anchortype: Anchor;
}
<main>
<!-- sign-up section -->
<section class="sign-up">
<!-- the form itself -->
<form class="sign-up__form" action="" method="post" novalidate>
<div class="form__input">
<input class="" type="text" name="nome" id="nome" placeholder="Nome" value="" required>
<span class="warning-icon">!</span>
<p class="warning">O campo não pode estar vazio</p>
</div>
<main>
<!-- sign-up section -->
<section class="sign-up">
<!-- the form itself -->
<form class="sign-up__form" action="" method="post" novalidate>
<div class="form__input">
<input class="" type="text" name="nome" id="nome" placeholder="Nome" value="" required>
<span class="warning-icon">!</span>
<p class="warning">O campo não pode estar vazio</p>
</div>
const sendData = async () => {
const url = 'https://pontual.cvcrm.com.br/api/cvio/lead';
var request = new Request(url, {
method: "POST",
header: [
{
key: "email",
value: "melqui@rtimoveis.com",
type: "text"
@jonathasborges1
jonathasborges1 / trabalho_final_BD_I.sql
Last active November 5, 2022 20:19
Trabalho Final Banco de Dados - i
create table cliente (
login SERIAL PRIMARY KEY,
nome_cli varchar (40) not null,
sobrenome_cli varchar (40) not null,
log_end_cli varchar (80) not null,
cid_end_cli varchar (40) not null,
uf_end_cli varchar (10) not null,
tel_cli varchar (30) not null,
email_cli varchar (40) not null,
senha_cli varchar (40) not null
@jonathasborges1
jonathasborges1 / login.tsx
Created October 21, 2022 16:00
Login Page with Material UI and React JS
import {
Grid,
Paper,
Avatar,
TextField,
Button,
Typography,
Link,
Box,
} from "@mui/material";
@jonathasborges1
jonathasborges1 / atividade5p.sql
Last active October 17, 2022 05:01
ProgramacaoWeb-atividade5p
CREATE DATABASE escola
WITH
OWNER = postgres
ENCODING = 'UTF8'
CONNECTION LIMIT = -1
IS_TEMPLATE = False;
CREATE SCHEMA escola AUTHORIZATION postgres;
CREATE SCHEMA IF NOT EXISTS escola;
@jonathasborges1
jonathasborges1 / atividade1_pos_bd.sql
Last active October 3, 2022 02:07
Atividade 1 - Banco de Dados Pos Graduacao - create tables and Triggers
create table professor (
id_prof int generated always as identity,
nome_prof varchar (20) not null,
titulacao varchar (40) not null,
constraint tipo_titulo check (titulacao in ('assistente','associado','titular'))
);
create table prof_audit (
id_prof_audit int generated always as identity,
id_prof int not null,