- Makes menus fully accessible and keyboard driven - Currently adds 2.8% to initial bundle size due to the inclusion of Reakit and its dependency, popperjs. - Converts all menus to functional components - Remove old custom menu system - Various layout and flow improvements around the menus closes #1766
17 lines
351 B
JavaScript
17 lines
351 B
JavaScript
// @flow
|
|
import * as React from "react";
|
|
import { MenuSeparator } from "reakit/Menu";
|
|
import styled from "styled-components";
|
|
|
|
export default function Separator(rest: {}) {
|
|
return (
|
|
<MenuSeparator {...rest}>
|
|
{(props) => <HorizontalRule {...props} />}
|
|
</MenuSeparator>
|
|
);
|
|
}
|
|
|
|
const HorizontalRule = styled.hr`
|
|
margin: 0.5em 12px;
|
|
`;
|