Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tihuan committed Jan 18, 2024
1 parent 5ce5bfe commit b439453
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
5 changes: 2 additions & 3 deletions frontend/src/components/Header/components/Nav/style.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import styled from "@emotion/styled";
import { Classes } from "@blueprintjs/core";
import { css } from "@emotion/react";
import {
fontWeightBold,
Expand All @@ -16,8 +15,8 @@ export const Nav = styled.span`
gap: ${spacesL}px;
`;

interface ButtonProps extends CommonThemeProps {
isActive: boolean;
export interface ButtonProps extends CommonThemeProps {
isActive?: boolean;
}

export const button = (props: ButtonProps) => css`
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/components/Header/style.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { Classes, Colors } from "@blueprintjs/core";
import { css } from "@emotion/react";
import styled from "@emotion/styled";
import {
Chip,
CommonThemeProps,
getColors,
InputDropdown,
} from "@czi-sds/components";
import { Chip, getColors, InputDropdown } from "@czi-sds/components";
import { PT_GRID_SIZE_PX, PT_TEXT_COLOR } from "../common/theme";
import { button } from "src/components/Header/components/Nav/style";
import {
button,
ButtonProps,
} from "src/components/Header/components/Nav/style";
import { spacesL, spacesXl } from "src/common/theme";

export const HEADER_HEIGHT_PX = 56;
Expand Down Expand Up @@ -47,15 +45,17 @@ export const Right = styled.span`
gap: ${spacesL}px;
`;

const iconButton = (props: CommonThemeProps) => css`
const iconButton = (props: ButtonProps) => css`
${button(props)}
.${Classes.ICON} {
color: inherit; /* Overrides BP button icon color rule by inheriting color from parent. */
}
`;

export const AuthButtonWrapper = styled.span`
${iconButton}
.${Classes.BUTTON}.${Classes.MINIMAL} {
color: ${Colors.WHITE}; /* Overrides locally defined button color rule. */
font-weight: 400; /* Overrides locally defined button font weight rule. */
Expand Down

0 comments on commit b439453

Please sign in to comment.