Skip to content

Instantly share code, notes, and snippets.

@soapdog
Created June 19, 2017 21:38
Show Gist options
  • Save soapdog/88ac46a833be48515f0daeb90ddc7660 to your computer and use it in GitHub Desktop.
Save soapdog/88ac46a833be48515f0daeb90ddc7660 to your computer and use it in GitHub Desktop.
Testing mithril-bulma
import m from "mithril";
import Content from "../elements/content.js";
import Title from "../elements/title.js";
import Subtitle from "../elements/subtitle.js";
import Box from "../elements/box.js";
import Button from "../elements/button.js";
import Tag from "../elements/tag.js";
import Delete from "../elements/delete.js";
import Fa from "../elements/fa.js";
import Icon from "../elements/icon.js";
import Image from "../elements/image.js";
import Notification from "../elements/notification.js";
import Progress from "../elements/progress.js";
import Table from "../elements/table.js";
console.log("Loading elements...");
var test = m(".columns", [
m(".column", [
m(Content, [
m(Title, "Title"),
m(Subtitle, "This is the subtitle"),
m(Box, "this text is inside a box"),
m(Button, "text"),
m(Button, {class: "is-primary"}, "text"),
m(Tag, "text"),
m(Tag, {color: "is-primary"}, "text"),
m(Tag, {color: "is-danger", hasDelete: true}, "text"),
m(Delete),
m(Notification, "this is a notification"),
m(Notification, {class: "is-info"}, "this is a notification"),
m(Progress, {class: "is-primary", value: 15, max: 100}, "15%"),
m(Image, {class: "is-128x128"}, m("img", {src: "http://bulma.io/images/placeholders/256x256.png"})),
m(Icon, [m(Fa, {class: "fa-home"})])
])
])
]);
m.render(document.body, test);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment