diff --git a/src/chart.tsx b/src/chart.tsx index 23f6421..2041896 100644 --- a/src/chart.tsx +++ b/src/chart.tsx @@ -308,14 +308,19 @@ export class Chart extends React.PureComponent { render() { return (
-
- this.zoom(ZOOM_FACTOR)}> - + - - this.zoom(1 / ZOOM_FACTOR)}> - − - -
+ {this.props.enableZoom ? ( +
+ + +
+ ) : null} diff --git a/src/index.css b/src/index.css index d8042d2..0ba58cd 100644 --- a/src/index.css +++ b/src/index.css @@ -76,7 +76,7 @@ div.ui.card.intro { z-index: 10; } -.zoom a { +.zoom button { font-family: monospace; font-weight: bold; font-size: 20px; @@ -90,20 +90,28 @@ div.ui.card.intro { line-height: 26px; box-sizing: content-box; cursor: pointer; + padding: 0px; } -.zoom a:hover { +.zoom button:hover { background-color: #eee; - color: black; +} + +.zoom button:focus { + outline: 0px; } .zoom-in { border-top-left-radius: 4px; border-top-right-radius: 4px; + border-top: 0px; border-bottom: 1px solid #ccc; + border-left: 0px; + border-right: 0px; } .zoom-out { + border: 0px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; }