-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdoc.go
More file actions
33 lines (24 loc) · 945 Bytes
/
doc.go
File metadata and controls
33 lines (24 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
Quickstart Guide
1. In your project include the all-in-one distribution of the MDC javascript
library and set it to the global variable "mdc". This can be done a number of
ways (HTML script element, webpack, filename "mdc.inc.js" for gopherjs to pick
up, etc).
2. Import a Material component from this project in your Go progrem.
import "agamigo.io/material/checkbox"
3. Make the HTML suitable for that MDC component available to your GopherJS
program. See: https://material.io/components/web/catalog/
<html>
<body>
<div class="mdc-checkbox">
<input class="mdc-checkbox__native-control" type="checkbox">
</div>
</body>
</html>
4. Put that HTMLElement into a GopherJS object.
cbElem := js.Global.Get("document").Get("body").Get("firstElementChild")
5. Create a new instance of the component and start it.
cb := checkbox.CB{}
cb.Start(cbElem)
*/
package material // import "agamigo.io/material"