Created
July 24, 2017 11:13
-
-
Save huyderman/5c3f0963aac39d4c202cd37a26c90182 to your computer and use it in GitHub Desktop.
Riot mixin for adding a BottleJS container to a tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require! bottlejs: { pop } | |
# Riot mixin for adding a BottleJS container to a tag | |
# | |
# @param [String|Bottle] @bottle A Bottle or the name of the bottle to pop | |
# @return [Object] | |
export Molotov = -> | |
@bottle = if typeof! it is \Bottle | |
then it | |
else pop it | |
init: -> | |
container: ~> @bottle.container |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment