Skip to content

Commit 4d4b3f1

Browse files
committed
add jsdoc comments
1 parent 42bbcb8 commit 4d4b3f1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

dlib.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt Apache-2.0
22
DLib = {};
3+
4+
/**
5+
* Create a box
6+
* @param {Object} options - Box options
7+
* @param {string} options.title - Title of box
8+
* @param {string} options.text - Box text
9+
* @param {string} options.titleType - The tag used for the title
10+
* @param {string} options.textType - The tag used for the text
11+
* @param {boolean} options.breakAfterTitle - If there should be a <br> after the title
12+
* @param {(string|false)} options.linkTo - Where the box should link to, if anything
13+
* @param {boolean} options.expands - If the box should expand on hover
14+
* @param {(string|false)} options.id - What the id of the box should be, if any
15+
* @param {(string|false)} options.expandedTitle - What the title of the box should change to on expansion, if anything
16+
* @param {(string|false)} options.expandedText - What the text of the box should change to on expansion, if anything
17+
*/
318
DLib.createBox = ({title, text, titleType='h3', textType='span', breakAfterTitle=false, linkTo=false, container='body', expands=false, id=false, expandedTitle=false, expandedText=false}) => {
419
box = '';
520
box += linkTo ? `<a href="${linkTo}">` : ``;

0 commit comments

Comments
 (0)