use import instead of require
It looks nicer and was suggested by @somebee.
This commit is contained in:
parent
f1bd921d03
commit
98b8a2cb0d
|
@ -1,4 +1,4 @@
|
||||||
var styles = require('./styles/index.css')
|
import {vbox, completed} from './styles/index.css'
|
||||||
|
|
||||||
var store = {
|
var store = {
|
||||||
title: ""
|
title: ""
|
||||||
|
@ -20,11 +20,11 @@ tag App
|
||||||
item:completed = !item:completed
|
item:completed = !item:completed
|
||||||
|
|
||||||
def render
|
def render
|
||||||
<self.{styles:vbox}>
|
<self.{vbox}>
|
||||||
<header>
|
<header>
|
||||||
<input[data:title] placeholder="New..." :keyup.enter.addItem>
|
<input[data:title] placeholder="New..." :keyup.enter.addItem>
|
||||||
<button :tap.addItem> 'Add item'
|
<button :tap.addItem> 'Add item'
|
||||||
<ul> for item in data:items
|
<ul> for item in data:items
|
||||||
<li .{item:completed and styles:completed} :tap.completeItem(item)> item:title
|
<li .{item:completed and completed} :tap.completeItem(item)> item:title
|
||||||
|
|
||||||
Imba.mount <App[store]>
|
Imba.mount <App[store]>
|
||||||
|
|
Loading…
Reference in New Issue