mirror of
https://github.com/cssgunc/compass.git
synced 2025-04-06 20:50:17 -04:00
debug disabled prop
This commit is contained in:
parent
7da992c8ab
commit
c510c59057
|
@ -19,7 +19,10 @@ export default function Page() {
|
|||
|
||||
|
||||
useEffect(() => {
|
||||
setIsButtonDisabled(newPassword === '' || confirmPassword === '');
|
||||
console.log('newPassword',newPassword)
|
||||
console.log('confirmPassword',confirmPassword)
|
||||
setIsButtonDisabled(newPassword === '' || confirmPassword === '' || newPassword !== confirmPassword);
|
||||
console.log('newPasswordDisabledTest',isButtonDisabled)
|
||||
}, [newPassword, confirmPassword]);
|
||||
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
import React, { FunctionComponent, InputHTMLAttributes, ReactNode } from 'react';
|
||||
import React, { FunctionComponent, InputHTMLAttributes, ReactNode, ChangeEvent } from 'react';
|
||||
|
||||
type InputProps = InputHTMLAttributes<HTMLInputElement> & {
|
||||
icon?: ReactNode;
|
||||
title?: ReactNode;
|
||||
type?:ReactNode;
|
||||
placeholder?:ReactNode
|
||||
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
||||
};
|
||||
|
||||
const Input: FunctionComponent<InputProps> = ({ icon, type, title, placeholder, ...rest }) => {
|
||||
const Input: FunctionComponent<InputProps> = ({ icon, type, title, placeholder, onChange, ...rest }) => {
|
||||
return (
|
||||
<div>
|
||||
<label
|
||||
|
@ -20,6 +21,7 @@ const Input: FunctionComponent<InputProps> = ({ icon, type, title, placeholder,
|
|||
type={type}
|
||||
id={title}
|
||||
placeholder={placeholder}
|
||||
onChange={onChange}
|
||||
className="mt-1 w-full border-none p-0 focus:border-transparent focus:outline-none focus:ring-0 sm:text-sm"
|
||||
/>
|
||||
</label>
|
||||
|
|
Loading…
Reference in New Issue
Block a user