This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
outline/frontend/components/DropdownMenu/DropdownMenuItem.js
Tom Moor 3613e01094 Insert block menu (#297)
* Insert block behavior

* Functional with horizontal rule

* Add list and image upload working

* Cleanup typing

* Closest to correct behavior so far

* Improve block insert on list

* Hide (+) after clicking menu item

* Bad merge
2017-10-17 20:22:20 -07:00

48 lines
756 B
JavaScript

// @flow
import React from 'react';
import styled from 'styled-components';
import { color } from 'styles/constants';
const DropdownMenuItem = ({
onClick,
children,
}: {
onClick?: SyntheticEvent => void,
children?: React.Element<any>,
}) => {
return (
<MenuItem onClick={onClick}>
{children}
</MenuItem>
);
};
const MenuItem = styled.div`
margin: 0;
padding: 5px 10px;
height: 32px;
color: ${color.slateDark};
display: flex;
justify-content: left;
align-items: center;
cursor: pointer;
font-size: 15px;
svg {
margin-right: 8px;
}
a {
text-decoration: none;
width: 100%;
}
&:hover {
color: ${color.white};
background: ${color.primary};
}
`;
export default DropdownMenuItem;