striven-editor

Maintained and contributed to an open source WYSIWYG editor as an internship project that made it to production and was adopted by the company I was working at.
git clone https://unitehenry.com/git/striven-editor.git
Log | Files | Refs | README | LICENSE

commit 2035870ce3f3d8e2d57b81f8db5f0e1a463923e9
parent 6da8bb6ff88ca4725629be1cb9d01c72eb9f1f6b
Author: Henry Unite <unitehenry@gmail.com>
Date:   Mon,  7 Sep 2020 15:51:16 -0400

createSVG

Diffstat:
Msrc/utils.js | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/utils.js b/src/utils.js @@ -6,7 +6,7 @@ * @param {Width} Width of the SVG * @returns {HTMLElement} Returns SVG Element */ -export const createSVG = () => { +export const createSVG = (svgData, fillColor = '#000', height = 16, width = 16) => { const {viewBox, d} = svgData; const xmlns = 'http://www.w3.org/2000/svg'; @@ -88,4 +88,4 @@ export const blowUpElement = (el, bg = '#fff', onExpand) => { window.addEventListener('keydown', escapeEvt); el.addEventListener('keydown', escapeEvt); -} -\ No newline at end of file +}