Validations added temporarily

This commit is contained in:
Laux Dev
2026-03-05 11:52:21 +08:00
parent 7f42f61431
commit dae12d74ee
13 changed files with 116 additions and 171 deletions

View File

@@ -3,7 +3,7 @@ import styles from "./styles.module.css";
import AddIcon from "../../icons/add";
const PrimaryButton = (props) => {
return (
<button className={styles.button} {...props}>
<button className={styles.button} {...props} type="submit">
{props?.icon}
{props.text}
</button>

View File

@@ -51,7 +51,9 @@
border: 1px solid #616583;
color: #85869b;
cursor: not-allowed;
pointer-events: none;
user-select: none;
}
.input:invalid {
border: 1px solid #b43939;
}

View File

@@ -1,10 +1,11 @@
import React from "react";
"use client";
import styles from "./styles.module.css";
const TextField = ({ placeHolder, ...props }) => {
const TextField = ({ placeHolder, hasError, ...props }) => {
return (
<input
className={styles.input}
className={`${styles.input} ${hasError ? styles.error : null}`}
type="text"
pattern="[a-z]*"
placeholder={placeHolder}
{...props}
/>

View File

@@ -1,4 +1,3 @@
import React, { useState } from "react";
import styles from "./styles.module.css";
const Prompts = ({ show }) => {

View File

@@ -89,7 +89,9 @@ const TopHeader = (props) => {
<>
<PrimaryButton
text="Save"
onClick={() => setTriggerAlert(!triggerAlert)}
form="form"
type="submit"
/* onClick={() => setTriggerAlert(!triggerAlert)} */
icon={<CheckIcon width={20} height={20} />}
/>