initial: mirror of @fn_library from fn_registry
75 components + DESIGN_SYSTEM.md + sync script. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
import * as React from 'react'
|
||||
import { TextInput, Box } from '@mantine/core'
|
||||
|
||||
function Input({
|
||||
className,
|
||||
type,
|
||||
...props
|
||||
}: React.ComponentProps<typeof TextInput> & { type?: string }) {
|
||||
return (
|
||||
<TextInput
|
||||
type={type}
|
||||
data-slot="input"
|
||||
size="sm"
|
||||
className={className}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
interface InputGroupProps {
|
||||
children: React.ReactNode
|
||||
className?: string
|
||||
}
|
||||
|
||||
function InputGroup({ children, className }: InputGroupProps) {
|
||||
return (
|
||||
<Box data-slot="input-group" className={className}>
|
||||
{children}
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
|
||||
interface InputIconProps {
|
||||
children: React.ReactNode
|
||||
position: 'start' | 'end'
|
||||
className?: string
|
||||
}
|
||||
|
||||
function InputIcon({ children, position, className }: InputIconProps) {
|
||||
return (
|
||||
<Box
|
||||
data-slot={`input-icon-${position}`}
|
||||
component="span"
|
||||
className={className}
|
||||
style={{
|
||||
display: 'inline-flex',
|
||||
alignItems: 'center',
|
||||
pointerEvents: 'none',
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
|
||||
export { Input, InputGroup, InputIcon }
|
||||
export type { InputGroupProps, InputIconProps }
|
||||
Reference in New Issue
Block a user