How to use the @alifd/next.Menu.CheckboxItem function in @alifd/next

To help you get started, we’ve selected a few @alifd/next examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alibaba-fusion / next / docs / menu / adaptor / index.jsx View on Github external
const createMenuItem = (item, selectType) => {
    if (item.children.length > 0) {
        return (
             type === ContentType.text).map(({ value }) => value).join('') : ''}>
                {createContents(item.children, selectType)}
            
        );
    }

    let Item = Menu.Item;

    if (selectType === 'checkbox') {
        Item = Menu.CheckboxItem;
    } else if (selectType === 'radio') {
        Item = Menu.RadioItem;
    }

    return  type === 'icon' ?  : value)} />;
};