NEWS: Welcome to my new homepage! <3

feat: Added $html property - figure - Unnamed repository; edit this file 'description' to name the repository.

figure

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 1d41ef3b7d8b7a12a33c0a4f48ac44d3748ad8fe
parent 0905e9b1cd3f06f4f25ebd37de3bc03a18e7517c
Author: typable <contact@typable.dev>
Date:   Sat, 30 Sep 2023 23:44:11 +0200

feat: Added $html property

Diffstat:
Mlib.js | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/lib.js b/lib.js @@ -262,6 +262,11 @@ export default function figure(create) { props[key] = prop; } } + const htmlMatch = /^\$html$/.exec(attr); + if (htmlMatch) { + // bind inner html + props['dangerouslySetInnerHTML'] = { __html: value }; + } props[attr] = value instanceof Array ? value.join('') : value; } const children = /** @type {ReactElement[]} */ ([]);