feat(node): add as property to allow custom HTML elements
This commit is contained in:
@@ -23,6 +23,10 @@ export type NodeBase<
|
||||
data: NodeData;
|
||||
/** Type of node defined in `nodeTypes`. */
|
||||
type?: NodeType;
|
||||
/** Custom element type for rendering the node (e.g., 'div', 'li', etc.).
|
||||
* @default 'div'
|
||||
*/
|
||||
as?: Extract<keyof HTMLElementTagNameMap, 'div' | 'li' | 'ul' | 'ol'>;
|
||||
/**
|
||||
* Only relevant for default, source, target nodeType. Controls source position.
|
||||
* @example 'right', 'left', 'top', 'bottom'
|
||||
|
||||
Reference in New Issue
Block a user