mirror of
https://github.com/davidmarkclements/0x.git
synced 2026-01-25 14:47:55 +00:00
13 lines
332 B
JavaScript
13 lines
332 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
|
|
}
|