mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-02-01 20:10:35 +01:00
fix: ensure tool overlay icon styling is type-safe
This commit is contained in:
parent
0740ad946c
commit
130168e171
@ -59,8 +59,8 @@ const ToolPanelOverlayTile: React.FC<ToolPanelOverlayTileProps> = ({
|
||||
return null;
|
||||
}
|
||||
|
||||
if (React.isValidElement(tool.icon)) {
|
||||
const existingStyle = (tool.icon.props as { style?: React.CSSProperties }).style || {};
|
||||
if (React.isValidElement<{ style?: React.CSSProperties }>(tool.icon)) {
|
||||
const existingStyle = tool.icon.props.style || {};
|
||||
return React.cloneElement(tool.icon, {
|
||||
style: {
|
||||
...existingStyle,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user