feat: update studio header to be more accessible

This commit is contained in:
KristinAoki
2023-10-02 09:32:16 -04:00
parent 677e872320
commit 9f48ccc66b
18 changed files with 999 additions and 535 deletions

View File

@@ -0,0 +1,38 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
Dropdown,
DropdownButton,
} from '@edx/paragon';
const NavDropdownMenu = ({
id,
buttonTitle,
items,
}) => (
<DropdownButton
id={id}
title={buttonTitle}
variant="tertiary"
>
{items.map(item => (
<Dropdown.Item
href={item.href}
className="small"
>
{item.title}
</Dropdown.Item>
))}
</DropdownButton>
);
NavDropdownMenu.propTypes = {
id: PropTypes.string.isRequired,
buttonTitle: PropTypes.string.isRequired,
items: PropTypes.arrayOf(PropTypes.shape({
href: PropTypes.string,
title: PropTypes.string,
})).isRequired,
};
export default NavDropdownMenu;