mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-31 18:24:10 +00:00
22 lines
467 B
TypeScript
22 lines
467 B
TypeScript
|
|
import type { CSSProperties, ReactNode } from 'react';
|
||
|
|
import './InputAddon.css';
|
||
|
|
|
||
|
|
interface InputAddonProps {
|
||
|
|
children: ReactNode;
|
||
|
|
className?: string;
|
||
|
|
style?: CSSProperties;
|
||
|
|
onClick?: () => void;
|
||
|
|
}
|
||
|
|
|
||
|
|
export default function InputAddon({ children, className = '', style, onClick }: InputAddonProps) {
|
||
|
|
return (
|
||
|
|
<span
|
||
|
|
className={`input-addon ${className}`.trim()}
|
||
|
|
style={style}
|
||
|
|
onClick={onClick}
|
||
|
|
>
|
||
|
|
{children}
|
||
|
|
</span>
|
||
|
|
);
|
||
|
|
}
|