Skip to content

Instantly share code, notes, and snippets.

@natew
Created May 27, 2015 21:20
Show Gist options
  • Save natew/ec3c1243f8e6559d6bb7 to your computer and use it in GitHub Desktop.
Save natew/ec3c1243f8e6559d6bb7 to your computer and use it in GitHub Desktop.
store Farm {
@animals = ['cow', 'chicken', 'turkey']
}
view Main {
@name = 'Horse'
setAnimal = animal => @name = animal
<h1>Select your favorite animal</h1>
<img src={`wild`} />
<list repeat={Farm.@animals}>{animal =>
<Fav animal={animal} select={setAnimal} />
}</list>
$list = {
flexFlow: 'row',
width: '100%',
justifyContent: 'space-between'
}
}
view Fav {
<button click={() => ^select(^animal)}>{^animal}</button>
$button = {
width: 200,
border: 'none',
':hover': {
background: 'red'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment