Skip to content

Instantly share code, notes, and snippets.

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

Jonathas Borges Cavalcante jonathasborges1

🏠
Working from home
View GitHub Profile
@jonathasborges1
jonathasborges1 / TextFieldCheckBox.tsx
Created July 14, 2023 18:36
TextFieldCheckBox.tsx
import React, { useState } from "react";
import { Checkbox, FormControl, FormControlLabel, Grid, InputAdornment, InputLabel, TextField, Typography } from "@mui/material";
import { CheckBoxChecked, CheckBoxUnChecked } from "@components/Icons";
interface TextFieldCheckBoxProps {
id?: string;
name: string;
label?: string;
value: string;
options: string[];
@jonathasborges1
jonathasborges1 / MultipleSelectCheckBox.tsx
Created May 6, 2023 03:37
MultipleSelectCheckBox component
import { useState, useMemo, useCallback, useEffect } from "react";
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
import {
FormControl,
Select,
MenuItem,
Checkbox,
Typography,
ListItemText,
} from "@mui/material";
@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: "[email protected]",
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";