@@ -1572,71 +1572,72 @@ function PropertiesPanel({ keyIndex, onClose, config, onChange, iconSize, profil
15721572 < div className = "prop-section" >
15731573 < span className = "prop-label" > Icon</ span >
15741574
1575- < span className = "prop-label-sm" > Default</ span >
1576- < div className = "icon-picker-area" onClick = { ( ) => fileInputRef . current ?. click ( ) } >
1577- { config ?. iconDataUrl ? (
1578- < img src = { config . iconDataUrl } className = "icon-preview" alt = "Button icon" />
1579- ) : (
1580- < div className = "icon-picker-placeholder" >
1581- < svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" strokeWidth = "1.5" width = "24" height = "24" >
1582- < rect x = "3" y = "3" width = "18" height = "18" rx = "3" />
1583- < path d = "M12 8v8M8 12h8" />
1584- </ svg >
1585- < span > Add image</ span >
1575+ < div className = "icons-grid" >
1576+ { /* Default icon slot */ }
1577+ < div className = "icon-slot" >
1578+ < div className = "icon-slot-preview" onClick = { ( ) => fileInputRef . current ?. click ( ) } >
1579+ { config ?. iconDataUrl ? (
1580+ < img src = { config . iconDataUrl } className = "icon-preview" alt = "Button icon" />
1581+ ) : (
1582+ < div className = "icon-picker-placeholder" >
1583+ < svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" strokeWidth = "1.5" width = "22" height = "22" >
1584+ < rect x = "3" y = "3" width = "18" height = "18" rx = "3" />
1585+ < path d = "M12 8v8M8 12h8" />
1586+ </ svg >
1587+ </ div >
1588+ ) }
15861589 </ div >
1587- ) }
1588- </ div >
1589- < div className = "icon-action-row" >
1590- < button className = "icon-lib-open-btn" onClick = { ( ) => setLibraryTarget ( 'default' ) } >
1591- < svg viewBox = "0 0 16 16" fill = "none" stroke = "currentColor" strokeWidth = "1.5" width = "13" height = "13" >
1592- < path d = "M2 4.5A1.5 1.5 0 0 1 3.5 3h3l1.5 2H13a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H3.5A1.5 1.5 0 0 1 2 11.5v-7z" />
1593- </ svg >
1594- Icon Library
1595- </ button >
1596- { config ?. iconDataUrl && (
1597- < button className = "icon-remove-btn" onClick = { removeIcon } > Remove</ button >
1598- ) }
1599- </ div >
1600- < input
1601- ref = { fileInputRef }
1602- type = "file"
1603- accept = "image/*"
1604- style = { { display : 'none' } }
1605- onChange = { handleIconSelect }
1606- />
1590+ < span className = "icon-slot-label" > Default</ span >
1591+ < div className = "icon-slot-actions" >
1592+ < button className = "icon-slot-btn" title = "Icon Library" onClick = { ( ) => setLibraryTarget ( 'default' ) } >
1593+ < svg viewBox = "0 0 16 16" fill = "none" stroke = "currentColor" strokeWidth = "1.5" width = "13" height = "13" >
1594+ < path d = "M2 4.5A1.5 1.5 0 0 1 3.5 3h3l1.5 2H13a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H3.5A1.5 1.5 0 0 1 2 11.5v-7z" />
1595+ </ svg >
1596+ </ button >
1597+ { config ?. iconDataUrl && (
1598+ < button className = "icon-slot-btn icon-slot-remove" title = "Remove icon" onClick = { removeIcon } >
1599+ < svg viewBox = "0 0 10 10" fill = "none" stroke = "currentColor" strokeWidth = "1.6" width = "10" height = "10" strokeLinecap = "round" >
1600+ < path d = "M1 1l8 8M9 1L1 9" />
1601+ </ svg >
1602+ </ button >
1603+ ) }
1604+ </ div >
1605+ </ div >
16071606
1608- < span className = "prop-label-sm" style = { { marginTop : 10 } } > Pressed</ span >
1609- < div className = "icon-picker-area" onClick = { ( ) => pressedFileInputRef . current ?. click ( ) } >
1610- { config ?. pressedIconDataUrl ? (
1611- < img src = { config . pressedIconDataUrl } className = "icon-preview" alt = "Pressed icon" />
1612- ) : (
1613- < div className = "icon-picker-placeholder" >
1614- < svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" strokeWidth = "1.5" width = "24" height = "24" >
1615- < rect x = "3" y = "3" width = "18" height = "18" rx = "3" />
1616- < path d = "M12 8v8M8 12h8" />
1617- </ svg >
1618- < span > Add image</ span >
1607+ { /* Pressed icon slot */ }
1608+ < div className = "icon-slot" >
1609+ < div className = "icon-slot-preview" onClick = { ( ) => pressedFileInputRef . current ?. click ( ) } >
1610+ { config ?. pressedIconDataUrl ? (
1611+ < img src = { config . pressedIconDataUrl } className = "icon-preview" alt = "Pressed icon" />
1612+ ) : (
1613+ < div className = "icon-picker-placeholder" >
1614+ < svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" strokeWidth = "1.5" width = "22" height = "22" >
1615+ < rect x = "3" y = "3" width = "18" height = "18" rx = "3" />
1616+ < path d = "M12 8v8M8 12h8" />
1617+ </ svg >
1618+ </ div >
1619+ ) }
16191620 </ div >
1620- ) }
1621- </ div >
1622- < div className = "icon-action-row" >
1623- < button className = "icon-lib-open-btn" onClick = { ( ) => setLibraryTarget ( 'pressed' ) } >
1624- < svg viewBox = "0 0 16 16" fill = "none" stroke = "currentColor" strokeWidth = "1.5" width = "13" height = "13" >
1625- < path d = "M2 4.5A1.5 1.5 0 0 1 3.5 3h3l1.5 2H13a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H3.5A1.5 1.5 0 0 1 2 11.5v-7z" />
1626- </ svg >
1627- Icon Library
1628- </ button >
1629- { config ?. pressedIconDataUrl && (
1630- < button className = "icon-remove-btn" onClick = { removePressedIcon } > Remove</ button >
1631- ) }
1621+ < span className = "icon-slot-label" > Pressed</ span >
1622+ < div className = "icon-slot-actions" >
1623+ < button className = "icon-slot-btn" title = "Icon Library" onClick = { ( ) => setLibraryTarget ( 'pressed' ) } >
1624+ < svg viewBox = "0 0 16 16" fill = "none" stroke = "currentColor" strokeWidth = "1.5" width = "13" height = "13" >
1625+ < path d = "M2 4.5A1.5 1.5 0 0 1 3.5 3h3l1.5 2H13a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H3.5A1.5 1.5 0 0 1 2 11.5v-7z" />
1626+ </ svg >
1627+ </ button >
1628+ { config ?. pressedIconDataUrl && (
1629+ < button className = "icon-slot-btn icon-slot-remove" title = "Remove pressed icon" onClick = { removePressedIcon } >
1630+ < svg viewBox = "0 0 10 10" fill = "none" stroke = "currentColor" strokeWidth = "1.6" width = "10" height = "10" strokeLinecap = "round" >
1631+ < path d = "M1 1l8 8M9 1L1 9" />
1632+ </ svg >
1633+ </ button >
1634+ ) }
1635+ </ div >
1636+ </ div >
16321637 </ div >
1633- < input
1634- ref = { pressedFileInputRef }
1635- type = "file"
1636- accept = "image/*"
1637- style = { { display : 'none' } }
1638- onChange = { handlePressedIconSelect }
1639- />
1638+
1639+ < input ref = { fileInputRef } type = "file" accept = "image/*" style = { { display : 'none' } } onChange = { handleIconSelect } />
1640+ < input ref = { pressedFileInputRef } type = "file" accept = "image/*" style = { { display : 'none' } } onChange = { handlePressedIconSelect } />
16401641
16411642 { libraryTarget && (
16421643 < IconLibraryModal
0 commit comments