Skip to content

Instantly share code, notes, and snippets.

@s-panferov
Last active Aug 29, 2015
Embed
What would you like to do?
var viewClass = bemr.block("card");
return DOM.div({className: viewClass},
DOM.div({className: viewClass.el("cover")},
avatar.AvatarF({
url: "/public/profile.png",
variant: avatar.Variant.Large,
className: viewClass.el("avatar")
}),
DOM.div({className: viewClass.el("name")}, user.name)
),
DOM.div({className: viewClass.el("primary-actions")},
button.ButtonF({
buttonStyle: button.ButtonStyle.Float,
onClick: this.onChat
}, "Chat"),
isContact ?
button.ButtonF({
buttonStyle: button.ButtonStyle.Float,
onClick: this.onRemove
}, "Remove from contacts") :
button.ButtonF({
buttonStyle: button.ButtonStyle.Float,
onClick: this.onAdd
}, "Add to contacts")
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment