Skip to content

Instantly share code, notes, and snippets.

@KenCorbettJr
Created October 13, 2014 18:14
Show Gist options
  • Save KenCorbettJr/e58521dac49c764883ad to your computer and use it in GitHub Desktop.
Save KenCorbettJr/e58521dac49c764883ad to your computer and use it in GitHub Desktop.
enyo-bootstrap example widgets
enyo.kind({
name: "App",
kind: "enyo.Scroller", components:[
{kind: "bootstrap.Navbar", brand: "Enyo Boostrap", inverse: true, navbarComponents: [
{kind: "bootstrap.NavbarNav", float: "right", components: [
{kind: "bootstrap.MenuItem", text: "A Small Well", href: "#"},
{kind: "bootstrap.NavDropdown", text: "A Small Well", href: "#", components: [
{kind: "bootstrap.DropdownMenu", components: [
{text: "Dropdown Menu Item 1", href: "#"},
{text: "Dropdown Menu Item 2", href: "#"}
]}
]}
]},
{kind: "bootstrap.NavbarNav", components: [
{kind: "bootstrap.MenuItem", text: "A Small Well", href: "#", active: true},
{kind: "bootstrap.MenuItem", text: "A Small Well", href: "#"},
{kind: "bootstrap.MenuItem", text: "A Small Well", href: "#"},
]},
]},
{kind: "bootstrap.Container", components: [
{kind: "bootstrap.Jumbotron",
popoverTitle: "Hello World",
popoverContent: "Isn't this great?",
mixins: [ "bootstrap.PopoverTrigger" ],
components: [
{tag: "h1", components: [
{kind: "bootstrap.GlyphIcon", icon: "resize-horizontal"},
{tag:"span", content:"Enyo Bootstrap"}
]},
{tag: "p", content: "Enyo kinds for bootstrap." },
]},
{kind: "bootstrap.Breadcrumb", components: [
{text: "Home", href: "#"},
{text: "Enyo Kinds", href: "#"}
]},
{kind: "bootstrap.Nav", type: "pills", components: [
{kind: "bootstrap.MenuItem", text: "A Small Well", href: "#"},
{kind: "bootstrap.NavDropdown", text: "A Small Well", href: "#", components: [
{kind: "bootstrap.DropdownMenu", components: [
{text: "Dropdown Menu Item 1", href: "#"},
{text: "Dropdown Menu Item 2", href: "#"}
]}
]}
]},
{kind: "bootstrap.Row", components: [
{kind: "bootstrap.Col", components: [
{kind: "bootstrap.Well", content: "A Normal Well", components: [
{ kind: "bootstrap.ButtonGroup", components: [
{ content: "Launch Modal", ontap: "launchModal" },
{ kind: "bootstrap.LoadingButton", content: "Success Button", type: "success"},
{ kind: "bootstrap.LoadingButton", content: "Primary Button", type: "primary" },
{ kind: "bootstrap.LoadingButton", content: "Warning Button", type: "warning" },
{ kind: "bootstrap.LoadingButton", content: "Danger Button", type: "danger" },
]},
{ kind: 'bootstrap.SplitDropdownButton', text: "Hello World", components: [
{kind: "bootstrap.DropdownMenu", components: [
{text: "Dropdown Menu Item 1", href: "#"},
{text: "Dropdown Menu Item 2", href: "#"}
]}
]}
]},
]}
]},
{kind: "bootstrap.Row", components: [
{kind: "bootstrap.Col", components: [
{kind: "bootstrap.Alert", type: "success", components: [
{tag: 'span', content: "Everything is great here. " },
{kind: 'bootstrap.AlertLink', content: "Everything is great here." },
]},
{kind: "bootstrap.Alert", components: [
{tag: 'span', content: "Everything is great here. " },
{kind: 'bootstrap.AlertLink', content: "Everything is ok here." }
]},
{kind: "bootstrap.Alert", type: "warning", dismissable: true, components: [
{ tag: "span", content: "Everything is not ok here." },
]},
{kind: "bootstrap.Alert", type: "danger", dismissable: true, components: [
{ tag: "span", content: "Everything is not terrible here." },
]},
]}
]},
{kind: "bootstrap.Table", striped: false, components: [
{kind: "bootstrap.TableHead", components: [
{components: [
{content: "Hello World"},
{content: "Goodness"}
]}
]},
{kind: "bootstrap.TableBody", components: [
{highlight: "danger", components: [
{content: "Hello World"},
{content: "Hello World"}
]}
]}
]},
{kind: "bootstrap.Pagination", components: [
{kind: "bootstrap.MenuItem", text: "1", active: true},
{kind: "bootstrap.MenuItem", text: "2"},
{kind: "bootstrap.MenuItem", text: "3"},
]},
{kind: "bootstrap.Pager", components: [
{kind: "bootstrap.MenuItem", text: "Last"},
{kind: "bootstrap.MenuItem", text: "Next"},
]},
{kind: "bootstrap.Popover", title: "Example Popover", content: "Hello World"}
]},
{
kind: "bootstrap.Modal",
title: "Title",
bodyComponents: [
{ content: "This is the body" },
],
footerComponents: [
{ kind: "bootstrap.ModalCloseButton", content: "Cancel" },
{ kind: "bootstrap.ModalCloseButton", type: "primary", content: "OK" },
]
}
],
launchModal: function() {
this.$.modal.show();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment