Skip to content

Commit

Permalink
fix: update enum usage
Browse files Browse the repository at this point in the history
Signed-off-by: tygao <[email protected]>
  • Loading branch information
raintygao committed Mar 11, 2024
1 parent 19d9006 commit a7b6729
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/core/public/overlays/sidecar/components/sidecar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { MountPoint } from '../../../types';
import { MountWrapper } from '../../../utils';
import './sidecar.scss';
import { ResizableButton } from './resizable_button';
import { ISidecarConfig, OverlaySidecarOpenOptions } from '../sidecar_service';
import { ISidecarConfig, OverlaySidecarOpenOptions, SIDECAR_DOCKED_MODE } from '../sidecar_service';

export interface Props {
sidecarConfig$: BehaviorSubject<ISidecarConfig | undefined>;
Expand All @@ -28,9 +28,10 @@ export const Sidecar = ({ sidecarConfig$, options, setSidecarConfig, i18n, mount
const classes = classNames(
'osdSidecarFlyout',
{
'osdSidecarFlyout--dockedRight': sidecarConfig?.dockedMode === 'right',
'osdSidecarFlyout--dockedLeft': sidecarConfig?.dockedMode === 'left',
'osdSidecarFlyout--dockedTakeover': sidecarConfig?.dockedMode === 'takeover',
'osdSidecarFlyout--dockedRight': sidecarConfig?.dockedMode === SIDECAR_DOCKED_MODE.RIGHT,
'osdSidecarFlyout--dockedLeft': sidecarConfig?.dockedMode === SIDECAR_DOCKED_MODE.LEFT,
'osdSidecarFlyout--dockedTakeover':
sidecarConfig?.dockedMode === SIDECAR_DOCKED_MODE.TAKEOVER,
'osdSidecarFlyout--hide': sidecarConfig?.isHidden === true,
},
options.className
Expand All @@ -46,7 +47,7 @@ export const Sidecar = ({ sidecarConfig$, options, setSidecarConfig, i18n, mount

const flyoutSizeStyle = useMemo(
() =>
sidecarConfig?.dockedMode === 'takeover'
sidecarConfig?.dockedMode === SIDECAR_DOCKED_MODE.TAKEOVER
? {
height: sidecarConfig?.paddingSize,
}
Expand Down

0 comments on commit a7b6729

Please sign in to comment.