Skip to content

Commit

Permalink
tsxiugai
Browse files Browse the repository at this point in the history
  • Loading branch information
mayfwl committed Aug 8, 2024
1 parent 034c82e commit 0958b9e
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions app/components/ui-lib.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,9 @@ export function Input(props: InputProps) {
);
}

// 定义一个接口 AriaProps,包含一个可选的 aria 属性
interface AriaProps {
aria?: string;
}

// 定义一个接口 PasswordInputProps,继承自 HTMLProps<HTMLInputElement> 和 AriaProps
// 用于描述密码输入框组件的属性
interface PasswordInputProps extends HTMLProps<HTMLInputElement>, AriaProps {}

export function PasswordInput(props: PasswordInputProps) {
export function PasswordInput(
props: HTMLProps<HTMLInputElement> & { aria?: string },
) {
const [visible, setVisible] = useState(false);
function changeVisibility() {
setVisible(!visible);
Expand Down

0 comments on commit 0958b9e

Please sign in to comment.