mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
Fixes leftsidebar pinned btns styles when darkmode is true and false (#847)
This commit is contained in:
parent
5d0ae0ed69
commit
677e1e9d6a
3 changed files with 10 additions and 3 deletions
|
|
@ -130,6 +130,7 @@ export const LeftSidebarDebugger = ({ darkMode, errors }) => {
|
|||
</button>
|
||||
)}
|
||||
<SidebarPinnedButton
|
||||
darkMode={darkMode}
|
||||
component={'Debugger'}
|
||||
state={popoverPinned}
|
||||
updateState={updatePopoverPinnedState}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@ import React from 'react';
|
|||
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
|
||||
import Tooltip from 'react-bootstrap/Tooltip';
|
||||
|
||||
export const SidebarPinnedButton = ({ state, component, updateState }) => {
|
||||
export const SidebarPinnedButton = ({ state, component, updateState, darkMode }) => {
|
||||
const tooltipMsg = state ? `Unpin ${component}` : `Pin ${component}`;
|
||||
|
||||
return (
|
||||
<SidebarPinnedButton.OverlayContainer tip={tooltipMsg}>
|
||||
<div
|
||||
className={`btn btn-sm m-1 ${state ? 'btn-light' : 'btn-outline-secondary'} ${
|
||||
className={`btn btn-sm m-1 ${darkMode ? 'btn-outline-secondary' : 'btn-default'} ${state && 'active'} ${
|
||||
component === 'Inspector' && 'position-absolute end-0'
|
||||
}`}
|
||||
onClick={updateState}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,12 @@ export const LeftSidebarInspector = ({ darkMode, globals, components, queries })
|
|||
className={`left-sidebar-item ${open && 'active'}`}
|
||||
/>
|
||||
<div {...content} className={`card popover ${open || popoverPinned ? 'show' : 'hide'}`}>
|
||||
<SidebarPinnedButton component={'Inspector'} state={popoverPinned} updateState={updatePopoverPinnedState} />
|
||||
<SidebarPinnedButton
|
||||
darkMode={darkMode}
|
||||
component={'Inspector'}
|
||||
state={popoverPinned}
|
||||
updateState={updatePopoverPinnedState}
|
||||
/>
|
||||
<div style={{ marginTop: '1rem' }} className="card-body">
|
||||
<ReactJson
|
||||
src={queries}
|
||||
|
|
|
|||
Loading…
Reference in a new issue