Added demographic information to the user
This commit is contained in:
@@ -8,9 +8,10 @@ interface Props {
|
||||
className?: string;
|
||||
disabled?: boolean;
|
||||
onClick?: () => void;
|
||||
type?: "button" | "reset" | "submit";
|
||||
}
|
||||
|
||||
export default function Button({color = "purple", variant = "solid", disabled = false, className, children, onClick}: Props) {
|
||||
export default function Button({color = "purple", variant = "solid", disabled = false, className, children, type, onClick}: Props) {
|
||||
const colorClassNames: {[key in typeof color]: {[key in typeof variant]: string}} = {
|
||||
purple: {
|
||||
solid: "bg-mti-purple-light text-white border border-mti-purple-light hover:bg-mti-purple disabled:text-mti-purple disabled:bg-mti-purple-ultralight selection:bg-mti-purple-dark",
|
||||
@@ -31,6 +32,7 @@ export default function Button({color = "purple", variant = "solid", disabled =
|
||||
|
||||
return (
|
||||
<button
|
||||
type={type}
|
||||
onClick={onClick}
|
||||
className={clsx(
|
||||
"py-4 px-6 rounded-full transition ease-in-out duration-300 disabled:cursor-not-allowed",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {useState} from "react";
|
||||
|
||||
interface Props {
|
||||
type: "email" | "text" | "password";
|
||||
type: "email" | "text" | "password" | "tel";
|
||||
required?: boolean;
|
||||
label?: string;
|
||||
placeholder?: string;
|
||||
@@ -28,6 +28,7 @@ export default function Input({type, label, placeholder, name, required = false,
|
||||
name={name}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
placeholder={placeholder}
|
||||
defaultValue={defaultValue}
|
||||
className="w-full px-8 py-6 text-sm font-normal placeholder:text-mti-gray-cool bg-white rounded-full border border-mti-gray-platinum focus:outline-none"
|
||||
/>
|
||||
<p
|
||||
|
||||
Reference in New Issue
Block a user