From e00b07737e6006f35575623ac20c53d447c6725f Mon Sep 17 00:00:00 2001 From: mguinhos Date: Fri, 18 Aug 2023 02:52:13 -0300 Subject: [PATCH] =?UTF-8?q?Adiciona=20bot=C3=B5es=20de=20contato=20para=20?= =?UTF-8?q?o=20GitHub=20e=20LinkedIn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/page.tsx | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 47f8261..6e45911 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,9 +1,12 @@ "use client"; -import { TextField, Button, Stack, Box } from '@mui/material' -import { useRef, useState } from 'react'; +import { TextField, Button, Stack, Box, Typography, IconButton } from '@mui/material' +import { useRef } from 'react'; import * as math from 'mathjs'; +import GitHubIcon from '@mui/icons-material/GitHub'; +import LinkedInIcon from '@mui/icons-material/LinkedIn'; + function CalculatorRow({ children, ...props }: any) { return {children}; } @@ -28,7 +31,18 @@ function CalculatorBox({ children, ...props }: any) { return {children}; } -function Calculator({ ...props }) { +function Footer({ ...props }: any) { + return ( + + 2023 - Marcel Guinhos - MIT License + Criado com NextJS e MaterialUI + + + + ); +} + +function Calculator({ ...props }: any) { let inputRef = useRef({value: ''}); return ( @@ -42,9 +56,9 @@ function Calculator({ ...props }) { inputRef.current.value = math.evaluate(inputRef.current.value)}>= - 7 - 8 - 9 + 1 + 2 + 3 + @@ -60,12 +74,13 @@ function Calculator({ ...props }) { / - +/- + inputRef.current.value = (inputRef.current.value.startsWith('-') ? '+' + inputRef.current.value.slice(1): '-' + (inputRef.current.value.startsWith('+') ? inputRef.current.value.slice(1) : inputRef.current.value))}>+/- 0 - . - % + . + % +