left highlight for active plugin icon

pull/5370/head
lianahus 12 months ago committed by yann300
parent 87ea8c9947
commit 85d49cb42d
  1. 7
      libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
  2. 4
      libs/remix-ui/vertical-icons-panel/src/lib/remix-ui-vertical-icons-panel.css

@ -84,15 +84,19 @@ const Icon = ({iconRecord, verticalIconPlugin, contextMenuAction, theme}: IconPr
} }
}, []) }, [])
const stylePC = iconRecord.active ? 'flex-start' : 'center'
return ( return (
<> <>
<div className='d-flex' style={{width: 'auto', placeContent: stylePC}}>
{iconRecord.active && <div className='pt-1 bg-primary' style={{width: "6px", height: "36px", position: 'relative'}}></div>}
<CustomTooltip <CustomTooltip
placement={name === 'settings' ? 'right' : name === 'search' ? 'top' : name === 'udapp' ? 'bottom' : 'top'} placement={name === 'settings' ? 'right' : name === 'search' ? 'top' : name === 'udapp' ? 'bottom' : 'top'}
tooltipText={title} tooltipText={title}
delay={{show: 1000, hide: 0}} delay={{show: 1000, hide: 0}}
> >
<div <div
className={`remixui_icon m-2 pt-1`} className={`remixui_icon m-0 pt-1`}
onClick={() => { onClick={() => {
;(verticalIconPlugin as any).toggle(name) ;(verticalIconPlugin as any).toggle(name)
}} }}
@ -127,6 +131,7 @@ const Icon = ({iconRecord, verticalIconPlugin, contextMenuAction, theme}: IconPr
contextMenuAction={contextMenuAction} contextMenuAction={contextMenuAction}
/> />
) : null} ) : null}
</div>
</> </>
) )
} }

@ -3,6 +3,8 @@
width: 42px; width: 42px;
height: 42px; height: 42px;
cursor: pointer; cursor: pointer;
justify-content: space-between;
align-self: center;
} }
.remixui_homeIcon:hover { .remixui_homeIcon:hover {
box-shadow: 0px 0px 14px -7px; box-shadow: 0px 0px 14px -7px;
@ -17,8 +19,6 @@
.remixui_icons { .remixui_icons {
display: flex; display: flex;
flex-flow: column nowrap; flex-flow: column nowrap;
justify-content: space-between;
align-items: center;
} }
.remixui_icon:hover { .remixui_icon:hover {
box-shadow: 0px 0px 14px -7px; box-shadow: 0px 0px 14px -7px;

Loading…
Cancel
Save