diff --git a/packages/react/src/components/password-input/password-input-indicator.tsx b/packages/react/src/components/password-input/password-input-indicator.tsx index 9a37bc5fd5..829cdc7e64 100644 --- a/packages/react/src/components/password-input/password-input-indicator.tsx +++ b/packages/react/src/components/password-input/password-input-indicator.tsx @@ -15,11 +15,12 @@ export interface PasswordInputIndicatorProps extends HTMLProps<'span'>, Password export const PasswordInputIndicator = forwardRef((props, ref) => { const passwordInput = usePasswordInputContext() - const mergedProps = mergeProps(passwordInput.getIndicatorProps(), props) + const { fallback, children, ...rest } = props + const mergedProps = mergeProps(passwordInput.getIndicatorProps(), rest) return ( - {passwordInput.visible ? props.children : props.fallback} + {passwordInput.visible ? children : fallback} ) }) diff --git a/packages/solid/src/components/password-input/password-input-indicator.tsx b/packages/solid/src/components/password-input/password-input-indicator.tsx index b3f39911d2..6ef6ee5339 100644 --- a/packages/solid/src/components/password-input/password-input-indicator.tsx +++ b/packages/solid/src/components/password-input/password-input-indicator.tsx @@ -1,5 +1,5 @@ import { mergeProps } from '@zag-js/solid' -import { type JSX, Show } from 'solid-js' +import { type JSX, Show, splitProps } from 'solid-js' import { type HTMLProps, type PolymorphicProps, ark } from '../factory' import { usePasswordInputContext } from './use-password-input-context' @@ -13,12 +13,13 @@ export interface PasswordInputIndicatorProps extends HTMLProps<'span'>, Password export const PasswordInputIndicator = (props: PasswordInputIndicatorProps) => { const passwordInput = usePasswordInputContext() - const mergedProps = mergeProps(() => passwordInput().getIndicatorProps(), props) + const [local, rest] = splitProps(props, ['fallback', 'children']) + const mergedProps = mergeProps(() => passwordInput().getIndicatorProps(), rest) return ( - - {props.children} + + {local.children} )