From 4d4b3f1185af1468ce40051577be9f41559fffaa Mon Sep 17 00:00:00 2001 From: Roux Sheikh Date: Tue, 16 Nov 2021 00:25:56 +0000 Subject: [PATCH] add jsdoc comments --- dlib.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dlib.js b/dlib.js index e28a04d..f5a0946 100644 --- a/dlib.js +++ b/dlib.js @@ -1,5 +1,20 @@ // @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt Apache-2.0 DLib = {}; + +/** + * Create a box + * @param {Object} options - Box options + * @param {string} options.title - Title of box + * @param {string} options.text - Box text + * @param {string} options.titleType - The tag used for the title + * @param {string} options.textType - The tag used for the text + * @param {boolean} options.breakAfterTitle - If there should be a
after the title + * @param {(string|false)} options.linkTo - Where the box should link to, if anything + * @param {boolean} options.expands - If the box should expand on hover + * @param {(string|false)} options.id - What the id of the box should be, if any + * @param {(string|false)} options.expandedTitle - What the title of the box should change to on expansion, if anything + * @param {(string|false)} options.expandedText - What the text of the box should change to on expansion, if anything + */ DLib.createBox = ({title, text, titleType='h3', textType='span', breakAfterTitle=false, linkTo=false, container='body', expands=false, id=false, expandedTitle=false, expandedText=false}) => { box = ''; box += linkTo ? `` : ``;