0x/visualizer/cmp/search.js
Renée Kooi 69d6faf6dc
Style fixes
- Fixes the height of the graph in FF
  For some reason `height: calc(100% - 66px)` does something totally
  different than `height: 100%`, but with `100vh` the behaviour is the
  same either way. This seems like a FF CSS bug maybe…
- Use floating + margins instead of absolute positions for top bar
  controls
  Default button and input sizes are different across browsers and OSes,
  by using floats + margins the positioning adapts to sizes instead of
  having things drawn on top of each other.
2018-07-04 11:47:39 +02:00

13 lines
330 B
JavaScript

'use strict'
const debounce = require('debounce')
module.exports = (render) => (action) => {
const search = render`
<input type="search" placeholder="search functions" class='fr f5 mr1'>
`
search.addEventListener('keydown', debounce(({ target }) => action({type: 'key', value: target.value}), 150))
return search
}