mirror of
https://github.com/davidmarkclements/0x.git
synced 2026-01-18 14:38:23 +00:00
13 lines
354 B
JavaScript
13 lines
354 B
JavaScript
'use strict'
|
|
|
|
const debounce = require('debounce')
|
|
|
|
module.exports = (render) => (action) => {
|
|
const search = render`
|
|
<input type="search" placeholder="search functions" class='absolute right-0 top-0 mt2 f5 mr1'>
|
|
`
|
|
search.addEventListener('keydown', debounce(({ target }) => action({type: 'key', value: target.value}), 150))
|
|
|
|
return search
|
|
}
|