fixed behav. on plugin change

pull/2634/head^2
lianahus 3 years ago committed by Aniket
parent 2cd55c9f69
commit b91dc6b530
  1. 3
      libs/remix-ui/panel/src/lib/plugins/panel-header.tsx

@ -11,6 +11,7 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => {
const [toggleExpander, setToggleExpander] = useState<boolean>(false)
useEffect(() => {
setToggleExpander(false)
if (props.plugins) {
const p = Object.values(props.plugins).find((pluginRecord) => {
return pluginRecord.active === true
@ -33,7 +34,7 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => {
{plugin?.profile.documentation && (<a href={plugin.profile.documentation} className="titleInfo mb-2" title="link to documentation" target="_blank" rel="noreferrer"><i aria-hidden="true" className="fas fa-book"></i></a>)}
</div>
<div className="swapitHeaderInfoSection d-flex justify-content-between" data-id='swapitHeaderInfoSectionId' onClick={toggleClass} title="Plugin info">
<i className={`px-2 ml-2 pt-1 ${!toggleExpander ? 'fas fa-angle-right' : 'fas fa-angle-down bg-light'}`} aria-hidden="true"></i>
<i className={`px-2 ml-2 pt-1 pb-4 ${!toggleExpander ? 'fas fa-angle-right' : 'fas fa-angle-down bg-light'}`} aria-hidden="true"></i>
</div>
</div>
</div>

Loading…
Cancel
Save