mirror of
https://github.com/cssgunc/compass.git
synced 2025-04-06 20:50:17 -04:00
fixing button component
This commit is contained in:
parent
5029b32aec
commit
9241d93f1b
|
@ -1,5 +1,5 @@
|
|||
"use client"
|
||||
import Button from '@/components/Button49';
|
||||
import Button from '@/components/Button';
|
||||
import Input from '@/components/Input'
|
||||
import InlineLink from '@/components/InlineLink';
|
||||
import Paper from '@/components/auth/Paper';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// pages/index.tsx
|
||||
"use client";
|
||||
import { useState, useEffect } from 'react';
|
||||
import Button from '@/components/Button1';
|
||||
import Button from '@/components/Button';
|
||||
import Input from '@/components/Input1';
|
||||
import Paper from '@/components/auth/Paper';
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// pages/index.tsx
|
||||
"use client";
|
||||
|
||||
import Button from '@/components/Button49';
|
||||
import Button from '@/components/Button1';
|
||||
import Button from '@/components/Button';
|
||||
import Input from '@/components/Input'
|
||||
import InlineLink from '@/components/InlineLink';
|
||||
import Paper from '@/components/auth/Paper';
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
import { FunctionComponent, ReactNode } from 'react';
|
||||
|
||||
type ButtonProps = {
|
||||
children: ReactNode;
|
||||
onClick?: () => void; // make the onClick handler optional
|
||||
type?: "button" | "submit" | "reset"; // specify possible values for type
|
||||
disabled?: boolean;
|
||||
};
|
||||
|
||||
const Button: FunctionComponent<ButtonProps> = ({ children, type, disabled, onClick }) => {
|
||||
const buttonClassName = `inline-block rounded border ${disabled ? 'bg-gray-400 text-gray-600 cursor-not-allowed' : 'border-purple-600 bg-purple-600 text-white hover:bg-transparent hover:text-purple-600 focus:outline-none focus:ring active:text-purple-500'} px-12 py-3 text-sm font-semibold`;
|
||||
return (
|
||||
<button
|
||||
className={buttonClassName}
|
||||
onClick={onClick}
|
||||
type={type}
|
||||
disabled={disabled}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
export default Button;
|
|
@ -8,7 +8,7 @@
|
|||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
|
|
Loading…
Reference in New Issue
Block a user