index.community/frontend/src/components/atoms/GraphHideEdgesButton.tsx

20 lines
598 B
TypeScript
Raw Normal View History

2019-08-04 12:41:44 +00:00
import { Switch } from "@blueprintjs/core";
import * as React from "react";
import styled from "styled-components";
import FloatingCard from "./FloatingCard";
const StyledSwitch = styled(Switch)`
margin: 0;
`;
interface IGraphHideEdgesButtonProps {
isShowingEdges: boolean;
toggleEdges: () => void;
}
const GraphHideEdgesButton: React.FC<IGraphHideEdgesButtonProps> = ({ isShowingEdges, toggleEdges }) => (
<FloatingCard>
2020-04-21 19:31:29 +00:00
<StyledSwitch checked={isShowingEdges} label="Show connections" onChange={toggleEdges} tabIndex={-1} />
2019-08-04 12:41:44 +00:00
</FloatingCard>
);
export default GraphHideEdgesButton;