Skip to content

Commit

Permalink
feat: add header icon
Browse files Browse the repository at this point in the history
  • Loading branch information
setchy committed Jul 8, 2024
1 parent 24d4cc0 commit 89e4575
Show file tree
Hide file tree
Showing 7 changed files with 176 additions and 131 deletions.
10 changes: 5 additions & 5 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { ArrowLeftIcon, type Icon } from '@primer/octicons-react';
import { type FC, type ReactNode, useContext } from 'react';
import { type FC, useContext } from 'react';
import { useNavigate } from 'react-router-dom';
import { AppContext } from '../context/App';
import { Size } from '../types';
import { Legend } from './settings/Legend';

interface IHeader {
children: ReactNode;
icon?: Icon;
icon: Icon;
children: string;
fetchOnBack?: boolean;
}

Expand Down Expand Up @@ -36,8 +37,7 @@ export const Header: FC<IHeader> = (props: IHeader) => {
</button>

<h3 className="text-lg font-semibold flex items-center">
<props.icon className="mr-2" />
{props.children}
<Legend icon={props.icon}>{props.children}</Legend>
</h3>
</div>
);
Expand Down
66 changes: 38 additions & 28 deletions src/components/__snapshots__/Header.test.tsx.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 19 additions & 14 deletions src/routes/__snapshots__/Accounts.test.tsx.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 19 additions & 14 deletions src/routes/__snapshots__/Filters.test.tsx.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 38 additions & 28 deletions src/routes/__snapshots__/LoginWithOAuthApp.test.tsx.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 38 additions & 28 deletions src/routes/__snapshots__/LoginWithPersonalAccessToken.test.tsx.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 89e4575

Please sign in to comment.