import * as React from 'react';

type AccordionProps = React.HTMLAttributes<HTMLDivElement> & {
    accordion: boolean;
};

const Accordion = ({ accordion, ...rest }: AccordionProps): JSX.Element => {
    const role = accordion ? 'tablist' : undefined;

    return <div role={role} {...rest} />;
};

export default Accordion;

import * as React from 'react';

type AccordionProps = React.HTMLAttributes<HTMLDivElement> & {
    accordion: boolean;
};

const Accordion = ({ accordion, ...rest }: AccordionProps): JSX.Element => {
    return <div {...rest} />;
};

export default Accordion;

Remove unnecessary tablist role from accordion parent
Remove unnecessary tablist role from accordion parent
