Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add flexible tagName support to PanelProps (#414)
related to (#407) Instead of fixing the `tagName` type to `keyof HTMLElementTagNameMap`, it has been made flexible by using a generic type. This allows TypeScript to better infer `event` object types like handleDrop when a specific tagName is provided in the component. ```jsx <Panel onDrop={(e: DragEvent<HTMLDivElement>) => { if (e.currentTarget.contains(e.relatedTarget)) return; }} className={styles.PanelRow} defaultSize={20} minSize={10} tagName="div" > <div className={styles.Centered}>left</div> </Panel> ```
- Loading branch information