import React, { useState, useCallback } from 'react';
import Button from 'components/button';
import Dropdown from 'components/dropdown';
export default function() {
    const [visible, set] = useState(true);

    const onVisibleChange = useCallback((v: boolean) => {
        console.log('onVisibleChange', v);
        set(v);
    }, []);
    return (
        <div>
            <Dropdown
                content="visible control"
                multiple={true}
                defaultValue={[3]}
                indicator={true}
                trigger="click"
                visible={visible}
                onVisibleChange={onVisibleChange}
                options={[
                    { label: '目录1', value: 1 },
                    { label: '目录2', value: 2 },
                    { label: '目录3', value: 3 },
                    { label: '目录4', value: 4 },
                    { label: '目录5', value: 5 },
                    { label: '目录6', value: 6 },
                ]}
                onChange={console.log}
            />
        </div>
    );
}
