Commit 2729cc86 authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Add documentation for CardComponent

parent 0253ab30
......@@ -2,7 +2,26 @@ import m from 'mithril';
import { apiUrl } from 'config';
import './Card.less';
export default class CheckboxComponent {
/**
* Card component
*
* Attributes:
*
* - `title` title to be shown
* - `href` link target on a click event
* - `img_poster` background image of the card
*
* Examples:
*
* m(CardComponent, {
* title: 'This is a very nice title!',
* href: 'https://www.ethz.ch/',
* img_poster: '/dist/images/test.jpg',
* })
*
* @return {CardComponent} generic card as mithril component.
*/
export default class CardComponent {
constructor(vnode) {
this.item = vnode.attrs;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment