mirror of
https://github.com/Jellify-Music/App.git
synced 2026-05-24 05:49:00 -05:00
32 lines
817 B
TypeScript
32 lines
817 B
TypeScript
import React from 'react';
|
|
import { Input as TamaguiInput, InputProps as TamaguiInputProps, XStack, YStack} from 'tamagui';
|
|
|
|
interface InputProps extends TamaguiInputProps {
|
|
prependElement?: React.JSX.Element | undefined;
|
|
}
|
|
|
|
export default function Input(props: InputProps): React.JSX.Element {
|
|
|
|
return (
|
|
<XStack>
|
|
|
|
|
|
{ props.prependElement && (
|
|
<YStack
|
|
flex={1}
|
|
alignItems='center'
|
|
justifyContent='center'
|
|
>
|
|
{ props.prependElement }
|
|
|
|
</YStack>
|
|
)}
|
|
|
|
<TamaguiInput
|
|
flex={props.prependElement ? 8 : 1}
|
|
{...props}
|
|
clearButtonMode="always"
|
|
/>
|
|
</XStack>
|
|
)
|
|
} |