Skip to content

Instantly share code, notes, and snippets.

@sarimarton
Created May 21, 2020 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sarimarton/aa4d5e350936f925cb2d3e69d4580aa6 to your computer and use it in GitHub Desktop.
Save sarimarton/aa4d5e350936f925cb2d3e69d4580aa6 to your computer and use it in GitHub Desktop.
FilterInput
FilterInput
Init
click -> DropdownActiveWithAllOptions
DropdownActiveWithAllOptions
type -> DropdownFilteredToOne
DropdownFilteredToOne
typeEnter -> InverseMode
InverseMode
function render (model) {
console.log(model)
return (
<>
</>
)
}
function ThumbContainer (props) {
return (
<div style={{ display: 'flex' }}>
<Thumbnail onClick={() => props.model.emit('selectMovie')} />
<Thumbnail onClick={() => props.model.emit('selectMovie')} />
<Thumbnail onClick={() => props.model.emit('selectMovie')} />
</div>
)
}
function Thumbnail (props) {
return (
<div
class="thumbnail"
style={{
cursor: 'pointer',
margin: '10px',
background: '#aaf',
width: '50px',
height: '50px'
}}
{ ...props }
></div>
)
}
function DetailsPage (props) {
return (
<div style={{
display: props.visible ? 'block' : 'none'
}}>
Details
</div>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment