Skip to content

Instantly share code, notes, and snippets.

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

Lucas Gomes lucasgomesoficial

🏠
Working from home
View GitHub Profile
import React, { JSXElementConstructor } from 'react'
import { SVGProps } from 'react'
export type IconProps = {
color?: string
} & SVGProps<SVGSVGElement>
export const Alert: JSXElementConstructor<IconProps> = ({ color, ...rest }) => {
return (
<svg
@lucasgomesoficial
lucasgomesoficial / HandleDate.js
Last active August 19, 2021 17:36
Javascript vanilla pra react
import { FormEvent, useState } from 'react';
function get () {
const [mes, setMes] = useState();
const [ano, setAno] = useState();
function handleDate (e: FormEvent) {
e.preventDefault();
diaInicial = new Date(ano, mes-1, 1).getDay();
const novastarefas = tarefas.push(item)
console.log(`Tarefas: ${novastarefas}`)
@lucasgomesoficial
lucasgomesoficial / cardProduct.js
Created August 1, 2021 22:54
return handlechange
global.setCart([{
id: props.id
quantity: Number(event.target.value) || ''
}])
import React from 'react'
import { Link } from 'react-router-dom'
import { HeaderContainer } from "./Style"
import HouseOutlinedIcon from '@material-ui/icons/HouseOutlined';
import ShoppingCartOutlinedIcon from '@material-ui/icons/ShoppingCartOutlined';
import PersonOutlineOutlinedIcon from '@material-ui/icons/PersonOutlineOutlined';
const Header = () => {
return (
<HeaderContainer>
@lucasgomesoficial
lucasgomesoficial / settings.json
Last active March 31, 2023 17:06
settings do vscode
{
"terminal.integrated.fontSize": 14,
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "newUntitledFile",
"polacode.backgroundColor": "#6633CC",
"editor.tabSize": 2,
"editor.fontSize": 16,
@lucasgomesoficial
lucasgomesoficial / MainCadastro.jsx
Last active June 24, 2021 02:47
Como usar a API
import React from 'react'
import api from '../../services/api'
import {
InputDescricao,
MainContainer,
ContainerPagamento,
SelectEstilizado,
InputServico,
BotaoOferecerServico,
InputDataEstilizado
import { createContext, ReactNode, useEffect, useState } from 'react'
type Theme = 'light' | 'dark';
type ThemeContextProviderProps = {
children: ReactNode;
}
type ThemeContextType = {
theme: Theme;