-
{action.icon ? (
React.cloneElement(action.icon, { size: 22 })
) : (
)}
{action.name}
{action.children?.length ? "…" : ""}
{action.shortcut?.length ? (
{action.shortcut.map((sc) => (
{sc}
))}
) : null}
);
}
const Icon = styled.div`
width: 22px;
height: 22px;
color: ${(props) => props.theme.textSecondary};
`;
const Item = styled.div`
font-size: 15px;
padding: 12px 16px;
background: ${(props) =>
props.active ? props.theme.menuItemSelected : "none"};
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
`;
const ForwardIcon = styled(BackIcon)`
transform: rotate(180deg);
`;
export default React.forwardRef