1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Rewrite gradient color for light theme

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-05-12 16:20:47 +03:00
parent 2cb9ed230e
commit 93814ae684
2 changed files with 10 additions and 5 deletions

View File

@ -1,5 +1,11 @@
.NamespaceSelectFilter {
--gradientColor: var(--contentColor);
.Select {
&.theme-light {
--gradientColor: #fff;
}
&__placeholder {
width: 100%;
white-space: nowrap;
@ -29,12 +35,12 @@
&::before {
left: 0px;
background: linear-gradient(to right, var(--contentColor) 0px, transparent);
background: linear-gradient(to right, var(--gradientColor) 0px, transparent);
}
&::after {
right: 0px;
background: linear-gradient(to left, var(--contentColor) 0px, transparent);
background: linear-gradient(to left, var(--gradientColor) 0px, transparent);
}
}
}

View File

@ -7,7 +7,7 @@ import { components, PlaceholderProps } from "react-select";
import { Icon } from "../icon";
import { FilterIcon } from "../item-object-list/filter-icon";
import { FilterType } from "../item-object-list/page-filters.store";
import { SelectOption } from "../select";
import { SelectOption, SelectProps } from "../select";
import { NamespaceSelect } from "./namespace-select";
import { namespaceStore } from "./namespace.store";
@ -33,9 +33,8 @@ const Placeholder = observer((props: PlaceholderProps<any>) => {
);
});
@observer
export class NamespaceSelectFilter extends React.Component {
export class NamespaceSelectFilter extends React.Component<SelectProps> {
formatOptionLabel({ value: namespace, label }: SelectOption) {
if (namespace) {
const isSelected = namespaceStore.hasContext(namespace);