Skip to content

Commit a78b152

Browse files
feat: export PasswordToggleButtonProps interface
- Define and export PasswordToggleButtonProps interface according to coding guidelines - Components should export both the component and its props type - Replace inline props definition with exported interface for better reusability
1 parent de0cacf commit a78b152

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

packages/components/src/ui/password-field.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ import {
1414
import { type InputProps, TextInput } from './text-input';
1515
import { cn } from './utils';
1616

17-
export const PasswordToggleButton = ({
18-
isVisible,
19-
onToggle,
20-
className,
21-
}: {
17+
export interface PasswordToggleButtonProps {
2218
isVisible: boolean;
2319
onToggle: () => void;
2420
className?: string;
25-
}) => {
21+
}
22+
23+
export const PasswordToggleButton = ({ isVisible, onToggle, className }: PasswordToggleButtonProps) => {
2624
return (
2725
<button
2826
type="button"

0 commit comments

Comments
 (0)