@lucsoft/webgen
Version:
Collection of lucsofts Components
17 lines (16 loc) • 574 B
JavaScript
import { custom, span } from "../Components";
import '../../css/cards.lline.webgen.static.css';
export const defaultCard = (options) => ({
getSize: () => ({ height: options.height, width: options.width }),
draw: (card) => {
if (options.small)
card.classList.add("small");
card.classList.add("lline");
card.append(custom('h1', options.title, 'title'));
if (options.subtitle) {
card.classList.add("subtitle");
card.append(span(options.subtitle, 'subtitle'));
}
return card;
}
});