From 77f647267946827a371ca58cdce1c48967d6c64b Mon Sep 17 00:00:00 2001 From: ashley zomo Date: Tue, 27 Dec 2022 22:50:16 -0600 Subject: [PATCH] Button --- src/components/Inputs.tsx | 22 +++++++++++++++++++++- src/pages/Layout.tsx | 16 +++------------- src/pages/Login.tsx | 15 +++------------ 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/components/Inputs.tsx b/src/components/Inputs.tsx index e52a8c8..6bd0114 100644 --- a/src/components/Inputs.tsx +++ b/src/components/Inputs.tsx @@ -1,4 +1,4 @@ -import { createRef, InputHTMLAttributes, useState } from "react" +import { createRef, HTMLAttributes, InputHTMLAttributes, useState } from "react" import { overrideTailwindClasses } from '../general' import { SVGEye } from "./Icons" @@ -73,4 +73,24 @@ export function InputPassword({ invalid, ...props }: InputProps) { ) +} + +interface ButtonProps extends HTMLAttributes { } + +export function Button({ children, ...props }: ButtonProps) { + return ( + + ) } \ No newline at end of file diff --git a/src/pages/Layout.tsx b/src/pages/Layout.tsx index 19023ba..ec1e796 100644 --- a/src/pages/Layout.tsx +++ b/src/pages/Layout.tsx @@ -1,6 +1,7 @@ import { Outlet, Navigate, NavLink } from 'react-router-dom' import { isLoggedIn, LoginState, usePersistentState } from '../authorization' import { SVGHamburger } from '../components/Icons' +import { Button } from '../components/Inputs' function SLink({ to, children, important }: { to: string, @@ -40,20 +41,9 @@ export function Layout() { bg-gray-700 text-gray-400 ${collapsed ? "w-14" : "w-48"} `}> -