Skip to content

Commit

Permalink
Normalize perspective dropdown (#91)
Browse files Browse the repository at this point in the history
* Remove unused css after pf fix/bump

* Normalize perspective dropdown
  • Loading branch information
gildub committed Apr 12, 2022
1 parent f43b287 commit 655a5c4
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
18 changes: 15 additions & 3 deletions pkg/client/src/app/layout/SidebarApp/SidebarApp.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
.perspective.pf-c-select {
--pf-global--Color--100: #fff;
--pf-global--BackgroundColor--100: #000;
.pf-c-select {
--pf-global--Color--100: var(--pf-global--palette--white);
--pf-global--BorderColor--100: var(--pf-global--palette--black-600);
--pf-c-select__menu--BackgroundColor: var(--pf-global--palette--black-850);
--pf-c-select__menu-item--Color: var(--pf-global--palette--white);
--pf-c-select__menu-item--hover--BackgroundColor: var(
--pf-global--palette--black-600
);
--pf-c-select__toggle--BackgroundColor: var(--pf-global--palette--black-850);
--pf-c-select__toggle--active--before--BorderBottomColor: var(
--pf-global--palette--white
);
--pf-c-select__toggle--m-expanded--before--BorderBottomColor: var(
--pf-global--palette--black-600
);
}
9 changes: 7 additions & 2 deletions pkg/client/src/app/layout/SidebarApp/SidebarApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ import DevIcon from "@patternfly/react-icons/dist/esm/icons/code-icon";

import { Paths } from "@app/Paths";
import { LayoutTheme } from "../LayoutUtils";
import "./SidebarApp.css";
import { checkAccess } from "@app/common/rbac-utils";
import keycloak from "@app/keycloak";
import {
LocalStorageKey,
useLocalStorageContext,
} from "@app/context/LocalStorageContext";

import "./SidebarApp.css";

export const SidebarApp: React.FC = () => {
const token = keycloak.tokenParsed || undefined;
const userRoles = token?.realm_access?.roles,
Expand Down Expand Up @@ -70,8 +71,12 @@ export const SidebarApp: React.FC = () => {
const Navigation = (
<>
<Select
style={{
borderStyle: "solid",
borderWidth: "0.1em",
borderColor: "white",
}}
toggleIcon={isDevIcon ? <DevIcon /> : <AdminIcon />}
className="perspective"
variant={SelectVariant.single}
aria-label="Select user perspective"
selections={selectedPersona}
Expand Down
14 changes: 0 additions & 14 deletions pkg/client/src/index.css

This file was deleted.

2 changes: 0 additions & 2 deletions pkg/client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import { NinjaErrorBoundary } from "@app/ninja-error-boundary";
import { LocalStorageContextProvider } from "@app/context/LocalStorageContext";
import { KeycloakProvider } from "@app/common/KeycloakProvider";

import "./index.css";

i18n.init();
const queryClient = new QueryClient();

Expand Down

0 comments on commit 655a5c4

Please sign in to comment.