use import instead of require

It looks nicer and was suggested by @somebee.
This commit is contained in:
Alexander Alemayhu 2019-10-21 06:58:24 +02:00
parent f1bd921d03
commit 98b8a2cb0d
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
var styles = require('./styles/index.css')
import {vbox, completed} from './styles/index.css'
var store = {
title: ""
@ -20,11 +20,11 @@ tag App
item:completed = !item:completed
def render
<self.{styles:vbox}>
<self.{vbox}>
<header>
<input[data:title] placeholder="New..." :keyup.enter.addItem>
<button :tap.addItem> 'Add item'
<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]>