import styled from 'styled-components';
import * as React from 'react';
interface Props {
style?: React.CSSProperties;
id: string;
title?: string;
children?: React.ReactNode;
onClick?: (e?: any) => void;
clickable?: boolean;
}
const ListItem = (props: Props) => (
{props.children && !props.title && props.children}
{!props.children && props.title && props.title}
);
export const StyledListItem = styled.div`
background-color: ${({ theme }) => theme.colorPalette.primary.main};
padding: 10px;
text-align: center;
${props => props.clickable && `
&:hover{
opacity: 0.8;
cursor: pointer;
}
&:active {
transform: scale(0.95);
}
`}
`;
ListItem.defaultProps = {
clickable: true,
}
export default ListItem;