import React, { useState } from 'react';
import Popover from 'components/popover';
import Input from 'components/input';
type IProps = {};
const Component = function(props: IProps) {
    const [tip, setTip] = useState('');
    const [visible, setVisible] = useState(true);
    return (
        <div>
            <Popover
                content={tip}
                trigger="click"
                visible={visible}
                onVisibleChange={e => {
                    console.log(e);
                    setVisible(e);
                }}
            >
                <Input
                    placeholder="tips based on input"
                    value={tip}
                    onChange={(e: any) => setTip(e.target.value)}
                    width={200}
                />
            </Popover>
        </div>
    );
};
Component.defaultProps = {};
export default Component;
