Skip to content

Chat, Todo, Weather ​

Chat, to-do and weather widgets for dashboards.

Chat, TodoList, Weather ​

Chat, TodoList, Weather
vue
<div class="thl-row">
  <div class="thl-col-12 thl-col-lg-4"><ThlCard title="Chat"><ThlChat :messages="messages" composer @send="send" /></ThlCard></div>
  <div class="thl-col-12 thl-col-lg-4"><ThlCard title="To do"><ThlTodoList :items="todos" addable @toggle="toggle" @remove="remove" @add="add" /></ThlCard></div>
  <div class="thl-col-12 thl-col-lg-4"><ThlWeather city="Hà Nội" :temp="28" condition="Partly cloudy" :days="[{ day: 'Mon', temp: 27, icon: 'sun' }, { day: 'Tue', temp: 25, icon: 'cloud-rain' }, { day: 'Wed', temp: 26, icon: 'cloud' }]" /></div>
</div>
tsx
<Chat messages={messages} onSend={send} />
<TodoList items={todos} addable onToggle={toggle} onRemove={remove} onAdd={add} />
<WeatherWidget city="Hà Nội" temp={28} condition="Partly cloudy" days={days} />
html
<thl-chat [messages]="messages()" composer (send)="send($event)" />
<thl-todo-list [items]="todos()" addable (toggle)="toggle($event)" (remove)="remove($event)" (add)="add($event)" />
<thl-weather city="Hà Nội" [temp]="28" condition="Partly cloudy" [days]="days" />

API ​

Chat

<ThlChat> · import { ThlChat } from '@thl-ui/vue'

PropTypeDefault
messages*array—
composerboolean—

Events: send

TodoList

<ThlTodoList> · import { ThlTodoList } from '@thl-ui/vue'

PropTypeDefault
items*array—
addableboolean—

Events: toggleremoveadd

Weather

<ThlWeather> · import { ThlWeather } from '@thl-ui/vue'

PropTypeDefault
citystring—
tempnumber—
conditionstring—
iconstring"cloud-sun"
daysarray—