Skip to content

Commit

Permalink
chore: improve styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricbet committed Jun 5, 2023
1 parent 6a270a8 commit 44276b1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
15 changes: 10 additions & 5 deletions packages/debug/src/browser/preferences/launch.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
box-sizing: border-box;
min-width: 500px;

.no_onfiguration {
padding: 0 16px;
}

.launch_panel {
height: 100%;
margin-top: 8px;
Expand All @@ -21,20 +25,21 @@
font-size: @small-base-font-size;
}
.configuration_items_box {
height: calc(100% - 40px) !important;
height: calc(100% - 50px) !important;
.configuration_item {
height: 22px;
height: 26px;
display: flex;
align-items: center;
cursor: pointer;
flex-direction: row;
padding: 4px;
padding: 4px 8px;

&:hover {
background: var(--list-hoverBackground);
color: var(--list-hoverForeground);
}
&.selected {
background: var(--list-activeSelectionBackground);
background: var(--kt-tree-inactiveSelectionBackground);
color: var(--list-activeSelectionForeground);
}

Expand Down Expand Up @@ -63,7 +68,7 @@
.launch_schema_body_container {
overflow: auto;
height: 100%;
padding: 0 16px 12px 0px;
padding: 0 16px 22px 0px;
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions packages/debug/src/browser/preferences/launch.view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ export const LaunchViewContainer: ReactEditorComponent<any> = ({ resource }) =>
snippetItems={snippetItems}
onSelectedConfiguration={onSelectedConfiguration}
onAddConfigurationItems={onAddConfigurationItems}
currentConfigurationIndex={currentConfigurationIndex}
/>
<LaunchBody
data-sp-flex={1}
Expand All @@ -229,11 +230,13 @@ const LaunchIndexs = ({
onSelectedConfiguration,
onAddConfigurationItems,
inputConfigurationItems,
currentConfigurationIndex,
}: {
snippetItems: IJSONSchemaSnippet[];
onSelectedConfiguration: (data: ConfigurationItemsModel, index: number) => void;
onAddConfigurationItems: (data: ConfigurationItemsModel) => void;
inputConfigurationItems: ConfigurationItemsModel[];
currentConfigurationIndex: number | undefined;
}) => {
const [menuOpen, setMenuOpen] = React.useState<boolean>(false);
const [configurationItems, setConfigurationItems] = useState<ConfigurationItemsModel[]>(inputConfigurationItems);
Expand All @@ -249,7 +252,7 @@ const LaunchIndexs = ({
const template = ({ data, index }) => (
<div
key={index}
className={cls(styles.configuration_item)}
className={cls(styles.configuration_item, currentConfigurationIndex === index ? styles.selected : '')}
onClick={() => handleConfigurationItemsClick(data, index)}
>
<div className={styles.configuration_wrapper}>
Expand Down Expand Up @@ -362,7 +365,7 @@ const LaunchBody = ({
onChange: (data: IChangeEvent, id?: string) => void;
}) => {
if (!snippetItem) {
return <div>{localize('debug.action.no.configuration')}</div>;
return <div className={styles.no_onfiguration}>{localize('debug.action.no.configuration')}</div>;
}

const launchService = useInjectable<LaunchService>(ILaunchService);
Expand Down

0 comments on commit 44276b1

Please sign in to comment.