From 2820c9e2d05537cda12ebcb43ce264475fe08224 Mon Sep 17 00:00:00 2001 From: Sylwia Date: Wed, 25 May 2022 21:06:40 +0200 Subject: [PATCH] JSDoc component documentation --- src/components/Bubble/Bubble.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/Bubble/Bubble.js b/src/components/Bubble/Bubble.js index e269248..c605da3 100644 --- a/src/components/Bubble/Bubble.js +++ b/src/components/Bubble/Bubble.js @@ -1,5 +1,13 @@ import './Bubble.css'; +/** + * Component creates speech bubble with or without image, with given header and optional sentences. + * Component accepts following inputs: + * @param {string} bubblePosition - "higher" or "lower" means that due to the "higher" or "lower" position of the bubble on the page, the arrow will be placed appropriately. + * @param {boolean} hasImage - whether the bubble will contain an image + * @param {string} header - header text in bubble + * @param {Array.} sentences - optional additional sentences in the bubble + */ export default function Bubble(bubblePosition, header = '', sentences = [], hasImage = false) { const bubble = document.createElement('div'); bubble.classList.add('bubble', bubblePosition);