UNPKG

laif-ds

Version:

Design System di Laif con componenti React basati su principi di Atomic Design

18 lines (17 loc) 614 B
"use client"; import { ListNode as o, ListItemNode as i, registerListStrictIndentTransform as n, registerList as a } from "../list/LexicalList.prod.js"; import { useLexicalComposerContext as f } from "./LexicalComposerContext.prod.js"; import { useEffect as e } from "react"; function c({ hasStrictIndent: r = !1 }) { const [t] = f(); return e(() => { if (!t.hasNodes([o, i])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor"); }, [t]), e(() => { if (r) return n(t); }, [t, r]), function(s) { e(() => a(s), [s]); }(t), null; } export { c as ListPlugin };