Added demographic information to the user

This commit is contained in:
Tiago Ribeiro
2023-09-13 11:28:13 +01:00
parent 8dcfb8a670
commit 27c6eff590
8 changed files with 2990 additions and 2592 deletions

View File

@@ -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",

View File

@@ -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