Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/ui/src/components/autocomplete/autocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ import { Key } from './key';

const useStyles = makeStyles((theme: Theme) => createStyles({
root: {
backgroundColor: theme.palette.background.five,
backgroundColor: theme.palette.background.one,
cursor: 'text',
display: 'flex',
flexDirection: 'column',
...scrollbarStyles(theme),
},
input: {
backgroundColor: theme.palette.background.four,
backgroundColor: theme.palette.background.three,
},
completions: {
flex: 1,
Expand All @@ -67,6 +67,7 @@ interface AutoCompleteProps {
placeholder?: string;
prefix?: React.ReactNode;
className?: string;
hint?: React.ReactNode;
}

type ItemsMap = Map<CompletionId, { title: CompletionTitle; index: number }>;
Expand Down Expand Up @@ -107,6 +108,7 @@ export const Autocomplete = React.memo<AutoCompleteProps>(({
placeholder,
prefix,
className,
hint,
}) => {
const classes = useStyles();
const {
Expand Down Expand Up @@ -203,6 +205,7 @@ export const Autocomplete = React.memo<AutoCompleteProps>(({
Showing top matches
</div>
)}
{hint}
</div>
);
});
Expand Down
16 changes: 9 additions & 7 deletions src/ui/src/components/autocomplete/completions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const useStyles = makeStyles((theme: Theme) => createStyles({
},
},
description: {
backgroundColor: theme.palette.background.one,
flex: 2,
borderLeftStyle: 'solid',
borderLeftWidth: '1px',
Expand All @@ -88,17 +89,18 @@ const useStyles = makeStyles((theme: Theme) => createStyles({
opacity: 0.3,
},
completion: {
...theme.typography.body1,
color: theme.palette.text.disabled,
backgroundColor: theme.palette.background.one,
paddingTop: theme.spacing(1),
paddingBottom: theme.spacing(1),
cursor: 'pointer',
'& > span': {
...theme.typography.body1,
fontFamily: theme.typography.monospace.fontFamily,
},
'&.active': {
backgroundColor: theme.palette.action.active,
color: theme.palette.text.secondary,
borderLeftStyle: 'solid',
borderLeftWidth: theme.spacing(0.5),
borderLeftColor: theme.palette.primary.main,
paddingLeft: theme.spacing(1.5),
color: theme.palette.text.primary,
backgroundColor: theme.palette.background.five,
},
display: 'flex',
alignItems: 'center',
Expand Down
6 changes: 1 addition & 5 deletions src/ui/src/components/autocomplete/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,11 @@ const useStyles = makeStyles((theme: Theme) => createStyles({
...theme.typography.h6,
position: 'relative',
cursor: 'text',
padding: theme.spacing(2.5),
padding: `${theme.spacing(1.25)} ${theme.spacing(3)}`,
fontWeight: theme.typography.fontWeightLight,
display: 'flex',
flexDirection: 'row',
alignItems: 'baseline',

'> *': {
flex: '1',
},
},
inputWrapper: {
position: 'relative',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,35 @@
exports[`<Breadcrumbs/> renders correctly 1`] = `
<div>
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation2 css-2psz7m-MuiPaper-root"
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation1 Breadcrumbs-triggerWrapper-1 css-zsf01h-MuiPaper-root"
>
<div
class="Breadcrumbs-breadcrumbs-1"
class="Breadcrumbs-breadcrumbs-2"
>
<div
class="Breadcrumbs-breadcrumb-2"
class="Breadcrumbs-breadcrumb-3"
>
<div
class="Breadcrumbs-body-6"
class="Breadcrumbs-body-8"
>
<div
class="Breadcrumbs-content-7"
class="Breadcrumbs-content-9"
>
<span
class="Breadcrumbs-title-3"
class="Breadcrumbs-title-5"
>
cluster:
</span>
<span
class="Breadcrumbs-selectable-5"
class="Breadcrumbs-selectable-7"
>
<span
class="Breadcrumbs-value-4"
class="Breadcrumbs-value-6"
>
gke-prod
</span>
<div
class="Breadcrumbs-dropdownArrow-8"
class="Breadcrumbs-dropdownArrow-10"
>
<svg
aria-hidden="true"
Expand All @@ -50,29 +50,32 @@ exports[`<Breadcrumbs/> renders correctly 1`] = `
</div>
</div>
<div
class="Breadcrumbs-breadcrumb-2"
class="Breadcrumbs-divider-12 Breadcrumbs-dividerHidden-13"
/>
<div
class="Breadcrumbs-breadcrumb-3"
>
<div
class="Breadcrumbs-body-6"
class="Breadcrumbs-body-8"
>
<div
class="Breadcrumbs-content-7"
class="Breadcrumbs-content-9"
>
<span
class="Breadcrumbs-title-3"
class="Breadcrumbs-title-5"
>
pod:
</span>
<span
class="Breadcrumbs-selectable-5"
class="Breadcrumbs-selectable-7"
>
<span
class="Breadcrumbs-value-4"
class="Breadcrumbs-value-6"
>
pod-123
</span>
<div
class="Breadcrumbs-dropdownArrow-8"
class="Breadcrumbs-dropdownArrow-10"
>
<svg
aria-hidden="true"
Expand All @@ -91,30 +94,33 @@ exports[`<Breadcrumbs/> renders correctly 1`] = `
</div>
</div>
<div
class="Breadcrumbs-breadcrumb-2"
class="Breadcrumbs-divider-12 Breadcrumbs-dividerHidden-13"
/>
<div
class="Breadcrumbs-breadcrumb-3"
>
<div
class="Breadcrumbs-body-6"
class="Breadcrumbs-body-8"
>
<div
class="Breadcrumbs-content-7"
class="Breadcrumbs-content-9"
>
<span
class="Breadcrumbs-title-3"
class="Breadcrumbs-title-5"
>
script:
</span>
<span
class=""
>
<span
class="Breadcrumbs-value-4"
class="Breadcrumbs-value-6"
>
px/pod
</span>
</span>
<div
class="Breadcrumbs-spacer-9"
class="Breadcrumbs-spacer-11"
/>
</div>
</div>
Expand Down
Loading