feat: add app and config
This commit is contained in:
23
packages/components/src/input/TextField.tsx
Normal file
23
packages/components/src/input/TextField.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { TextField as MuiTextField, TextFieldProps, Tooltip } from '@mui/material';
|
||||
import { useTheme } from '../theme';
|
||||
import { HelpCircle } from 'lucide-react';
|
||||
|
||||
export const TextField = (props: TextFieldProps) => {
|
||||
const theme = useTheme();
|
||||
const defaultProps = theme.components?.MuiTextField?.defaultProps;
|
||||
return <MuiTextField {...defaultProps} {...props} />;
|
||||
};
|
||||
|
||||
export const TextFieldLabel = ({ children, tips, label }: { children?: React.ReactNode; tips?: string; label?: any }) => {
|
||||
return (
|
||||
<div className='flex items-center gap-1'>
|
||||
{label}
|
||||
{children}
|
||||
{tips && (
|
||||
<Tooltip title={tips}>
|
||||
<HelpCircle size={16} />
|
||||
</Tooltip>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user