Skip to content

Instantly share code, notes, and snippets.

@s-panferov
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s-panferov/e4a32fa1c6155fe080f7 to your computer and use it in GitHub Desktop.
Save s-panferov/e4a32fa1c6155fe080f7 to your computer and use it in GitHub Desktop.
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