Skip to content

Instantly share code, notes, and snippets.

@kovchiy
Last active April 16, 2017 13:17
Show Gist options
  • Save kovchiy/190216b04be1f70786a08429451c172e to your computer and use it in GitHub Desktop.
Save kovchiy/190216b04be1f70786a08429451c172e to your computer and use it in GitHub Desktop.
Beast.decl({
Button: {
inherits: 'Control',
tag: 'button',
mod: {
Action: false,
Size: 'M',
/* ... */
},
param: {
href:'',
icon:''
},
onMod: {
State: {
active: () => {
/* ... */
},
release: () => {
/* ... */
}
}
},
on: {
Release: () => {
/* ... */
}
},
expand: fn () => {
this.inherited(fn)
if (this.param('icon')) {
this.append(<Icon Name="{this.param('icon')}"/>)
.mod('Medium', true)
}
/* ... */
},
value: (value) => {
/* ... */
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment