Skip to content

Commit

Permalink
fix(scene composer): cleanup for polaris css imports & moving interfa…
Browse files Browse the repository at this point in the history
…ce to component file
  • Loading branch information
mumanity committed May 12, 2023
1 parent c177802 commit d244eb5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
7 changes: 0 additions & 7 deletions packages/scene-composer/src/interfaces/sceneViewer.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { SceneLoader, TwinMakerSceneMetadataModule } from '@iot-app-kit/source-iottwinmaker';
import { DataStream, TimeQuery, TimeSeriesData, TimeSeriesDataRequest, Viewport } from '@iot-app-kit/core';

import { Direction } from '../layouts/SceneLayout/components/utils';

import { IDataBindingTemplate } from './dataBinding';
import { SelectionChangedEventCallback, WidgetClickEventCallback } from './components';

Expand All @@ -11,11 +9,6 @@ export interface DracoDecoderConfig {
path?: string;
}

export interface PanelType {
direction: typeof Direction.Left | typeof Direction.Right;
panels: Record<string, JSX.Element>;
}

export interface SceneViewerConfig {
dracoDecoder?: DracoDecoderConfig;
locale?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @use '~/@awsui-design-tokens/polaris.scss';
@use '@awsui/design-tokens/index.scss' as awsui;

.tm-wrapper-left,
.tm-wrapper-right {
Expand All @@ -17,10 +17,10 @@
flex-direction: column;
justify-content: center;
align-items: center;
border-left: 1px solid #414750; // TODO: fix awsui import to use $colorBorderDividerDefault;
border-right: 1px solid #414750; // TODO: fix awsui import to use $colorBorderDividerDefault;
border-left: 1px solid awsui.$color-border-divider-default;
border-right: 1px solid awsui.$color-border-divider-default;

&:hover {
background-color: #414750; // TODO: fix awsui import to use $colorBackgroundDropdownItemHover;
background-color: awsui.$color-background-dropdown-item-hover;
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import React, { useRef, useState } from 'react';

import { PanelType } from '../../../interfaces';

import { Direction } from './utils';
import FoldableContainer from './FoldableContainer';
import TabbedPanelContainer from './TabbedPanelContainer';
import './ScenePanel.scss';

interface PanelType {
direction: typeof Direction.Left | typeof Direction.Right;
panels: Record<string, JSX.Element>;
}

const ScenePanel = (props: PanelType) => {
const { direction, panels } = props;
const [isOpen, setIsOpen] = useState<boolean>(false);
Expand Down

0 comments on commit d244eb5

Please sign in to comment.