Files
web2.0-frontend/src/components/DropDownBox.tsx
T
2020-10-10 18:44:18 +03:00

37 lines
738 B
TypeScript

import React from "react";
import styled from "styled-components";
import { colors } from "@theme/colors";
interface DropDownBoxProps {
onMouseEnter: () => void;
onMouseLeave: () => void;
visible: boolean;
}
const Box = styled.div`
background-color: ${colors.white};
margin-top: 0.8rem;
position: absolute;
left: 0;
top: 30px;
z-index: 20;
a {
text-decoration: underline;
color: ${colors.darkBlue} !important;
text-transform: uppercase;
}
`;
const DropDownBox: React.FC<DropDownBoxProps> = ({ children, onMouseEnter, onMouseLeave, visible }) => (
<Box
onMouseEnter={onMouseEnter}
onMouseLeave={onMouseLeave}
hidden={!visible}
>
{children}
</Box>
);
export default DropDownBox;