diff --git a/src/components/AccountNotifications.tsx b/src/components/AccountNotifications.tsx index ad54f272d..c4bb53aad 100644 --- a/src/components/AccountNotifications.tsx +++ b/src/components/AccountNotifications.tsx @@ -5,7 +5,7 @@ import { } from '@primer/octicons-react'; import { type FC, useContext, useState } from 'react'; import { AppContext } from '../context/App'; -import type { Account } from '../types'; +import { type Account, Size } from '../types'; import type { Notification } from '../typesGitHub'; import { openAccountProfile } from '../utils/links'; import { NotificationRow } from './NotificationRow'; @@ -68,7 +68,7 @@ export const AccountNotifications: FC = ( onClick={toggleAccountNotifications} >
- +
diff --git a/src/components/Header.tsx b/src/components/Header.tsx index e1813cf14..23f7e3651 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,6 +1,7 @@ import { ArrowLeftIcon } from '@primer/octicons-react'; import type { FC, ReactNode } from 'react'; import { useNavigate } from 'react-router-dom'; +import { Size } from '../types'; interface IHeader { children: ReactNode; @@ -17,7 +18,7 @@ export const Header: FC = ({ children }: IHeader) => { onClick={() => navigate(-1)} > diff --git a/src/components/NotificationRow.tsx b/src/components/NotificationRow.tsx index dc6e83209..457cb8e5a 100644 --- a/src/components/NotificationRow.tsx +++ b/src/components/NotificationRow.tsx @@ -17,7 +17,7 @@ import { useState, } from 'react'; import { AppContext } from '../context/App'; -import { IconColor } from '../types'; +import { IconColor, Size } from '../types'; import type { Notification } from '../typesGitHub'; import { cn } from '../utils/cn'; import { @@ -126,7 +126,7 @@ export const NotificationRow: FC = ({ title={notificationTitle} > @@ -144,7 +144,7 @@ export const NotificationRow: FC = ({ @@ -180,13 +180,13 @@ export const NotificationRow: FC = ({ ) : (
- +
)}
{reason.title}
@@ -261,7 +261,7 @@ export const NotificationRow: FC = ({ markNotificationDone(notification); }} > - + diff --git a/src/components/RepositoryNotifications.tsx b/src/components/RepositoryNotifications.tsx index 31909999b..ccb95e8f1 100644 --- a/src/components/RepositoryNotifications.tsx +++ b/src/components/RepositoryNotifications.tsx @@ -7,6 +7,7 @@ import { } from '@primer/octicons-react'; import { type FC, useCallback, useContext, useState } from 'react'; import { AppContext } from '../context/App'; +import { Size } from '../types'; import type { Notification } from '../typesGitHub'; import { openRepository } from '../utils/links'; import { NotificationRow } from './NotificationRow'; @@ -59,7 +60,7 @@ export const RepositoryNotifications: FC = ({ = ({ title="Mark Repository as Done" onClick={markRepoAsDone} > - + diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 7548f79f9..b85c3507a 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -9,6 +9,7 @@ import { import { type FC, useContext, useMemo } from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; import { AppContext } from '../context/App'; +import { Size } from '../types'; import { quitApp } from '../utils/comms'; import { openGitHubIssues, @@ -54,7 +55,7 @@ export const Sidebar: FC = () => { onClick={() => openGitifyRepository()} data-testid="gitify-logo" > - + { refreshNotifications()} @@ -92,7 +93,7 @@ export const Sidebar: FC = () => { toggleSettings()} /> @@ -102,7 +103,7 @@ export const Sidebar: FC = () => { quitApp()} /> )} diff --git a/src/components/__snapshots__/RepositoryNotifications.test.tsx.snap b/src/components/__snapshots__/RepositoryNotifications.test.tsx.snap index 5d08ac19c..a294a63ca 100644 --- a/src/components/__snapshots__/RepositoryNotifications.test.tsx.snap +++ b/src/components/__snapshots__/RepositoryNotifications.test.tsx.snap @@ -13,7 +13,7 @@ exports[`components/Repository.tsx should render itself & its children 1`] = ` > gitify-app/notifications-test's avatar gitify-app/notifications-test's avatar { @@ -10,7 +10,7 @@ describe('components/buttons/Button.tsx', () => { const props: IButton = { name: 'Button', label: 'button', - size: 16, + size: Size.MEDIUM, }; beforeEach(() => { diff --git a/src/components/buttons/Button.tsx b/src/components/buttons/Button.tsx index 84960e1e8..7aaf37353 100644 --- a/src/components/buttons/Button.tsx +++ b/src/components/buttons/Button.tsx @@ -1,6 +1,6 @@ import type { Icon } from '@primer/octicons-react'; import type { FC } from 'react'; -import type { Link } from '../../types'; +import { type Link, Size } from '../../types'; import { cn } from '../../utils/cn'; import { openExternalLink } from '../../utils/comms'; @@ -9,7 +9,7 @@ export interface IButton { label: string; className?: string; icon?: Icon; - size?: number; + size?: Size; url?: Link; onClick?: () => void; disabled?: boolean; @@ -36,7 +36,9 @@ export const Button: FC = (props: IButton) => { } }} > - {props.icon && } + {props.icon && ( + + )} {props.name} ); diff --git a/src/components/buttons/PillButton.tsx b/src/components/buttons/PillButton.tsx index cabdddf1e..0c1be3f29 100644 --- a/src/components/buttons/PillButton.tsx +++ b/src/components/buttons/PillButton.tsx @@ -1,6 +1,6 @@ import type { Icon } from '@primer/octicons-react'; import type { FC } from 'react'; -import type { IconColor } from '../../types'; +import { type IconColor, Size } from '../../types'; export interface IPillButton { key?: string; @@ -17,7 +17,11 @@ export const PillButton: FC = (props: IPillButton) => { type="button" className="flex gap-1 items-center m-0.5 rounded-full bg-gray-100 px-1 text-xxs hover:bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-700" > - + {props.metric} ); diff --git a/src/components/buttons/SidebarButton.test.tsx b/src/components/buttons/SidebarButton.test.tsx index a5efea9b7..53bb475d1 100644 --- a/src/components/buttons/SidebarButton.test.tsx +++ b/src/components/buttons/SidebarButton.test.tsx @@ -1,5 +1,6 @@ import { MarkGithubIcon } from '@primer/octicons-react'; import { render } from '@testing-library/react'; +import { Size } from '../../types'; import { type ISidebarButton, SidebarButton } from './SidebarButton'; describe('components/buttons/SidebarButton.tsx', () => { @@ -22,4 +23,15 @@ describe('components/buttons/SidebarButton.tsx', () => { const tree = render(); expect(tree).toMatchSnapshot(); }); + + it('should render - medium', () => { + const props: ISidebarButton = { + title: 'Mock Sidebar Button', + metric: 0, + icon: MarkGithubIcon, + size: Size.MEDIUM, + }; + const tree = render(); + expect(tree).toMatchSnapshot(); + }); }); diff --git a/src/components/buttons/SidebarButton.tsx b/src/components/buttons/SidebarButton.tsx index 26a216728..ea9c11398 100644 --- a/src/components/buttons/SidebarButton.tsx +++ b/src/components/buttons/SidebarButton.tsx @@ -1,6 +1,6 @@ import type { Icon } from '@primer/octicons-react'; import type { FC } from 'react'; -import { IconColor } from '../../types'; +import { IconColor, Size } from '../../types'; import { cn } from '../../utils/cn'; export interface ISidebarButton { @@ -8,7 +8,7 @@ export interface ISidebarButton { metric?: number; icon: Icon; onClick?: () => void; - size?: number; + size?: Size; loading?: boolean; disabled?: boolean; } @@ -31,7 +31,7 @@ export const SidebarButton: FC = (props: ISidebarButton) => { title={props.title} disabled={props.disabled} > - + {hasMetric && props.metric} ); diff --git a/src/components/buttons/__snapshots__/SidebarButton.test.tsx.snap b/src/components/buttons/__snapshots__/SidebarButton.test.tsx.snap index 30add36d3..d4318b531 100644 --- a/src/components/buttons/__snapshots__/SidebarButton.test.tsx.snap +++ b/src/components/buttons/__snapshots__/SidebarButton.test.tsx.snap @@ -1,5 +1,110 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`components/buttons/SidebarButton.tsx should render - medium 1`] = ` +{ + "asFragment": [Function], + "baseElement": +
+ +
+ , + "container":
+ +
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + exports[`components/buttons/SidebarButton.tsx should render with metric 1`] = ` { "asFragment": [Function], diff --git a/src/components/icons/AuthMethodIcon.test.tsx b/src/components/icons/AuthMethodIcon.test.tsx index 2a72efa94..b1e33b544 100644 --- a/src/components/icons/AuthMethodIcon.test.tsx +++ b/src/components/icons/AuthMethodIcon.test.tsx @@ -1,11 +1,12 @@ import { render } from '@testing-library/react'; +import { Size } from '../../types'; import { AuthMethodIcon, type IAuthMethodIcon } from './AuthMethodIcon'; describe('components/icons/AuthMethodIcon.tsx', () => { it('should render GitHub App icon', () => { const props: IAuthMethodIcon = { type: 'GitHub App', - size: 16, + size: Size.MEDIUM, }; const tree = render(); expect(tree).toMatchSnapshot(); @@ -14,7 +15,7 @@ describe('components/icons/AuthMethodIcon.tsx', () => { it('should render Personal Access Token icon', () => { const props: IAuthMethodIcon = { type: 'Personal Access Token', - size: 16, + size: Size.MEDIUM, }; const tree = render(); expect(tree).toMatchSnapshot(); @@ -23,7 +24,7 @@ describe('components/icons/AuthMethodIcon.tsx', () => { it('should render OAuth App icon', () => { const props: IAuthMethodIcon = { type: 'OAuth App', - size: 16, + size: Size.MEDIUM, }; const tree = render(); expect(tree).toMatchSnapshot(); diff --git a/src/components/icons/AuthMethodIcon.tsx b/src/components/icons/AuthMethodIcon.tsx index bdf7bfdbc..85021bfbf 100644 --- a/src/components/icons/AuthMethodIcon.tsx +++ b/src/components/icons/AuthMethodIcon.tsx @@ -1,10 +1,11 @@ import { AppsIcon, KeyIcon, PersonIcon } from '@primer/octicons-react'; import type { FC } from 'react'; +import type { Size } from '../../types'; import type { AuthMethod } from '../../utils/auth/types'; export interface IAuthMethodIcon { type: AuthMethod; - size: number; + size: Size; } export const AuthMethodIcon: FC = (props: IAuthMethodIcon) => { diff --git a/src/components/icons/AvatarIcon.test.tsx b/src/components/icons/AvatarIcon.test.tsx index 4bb3c6c31..ff9fad8e3 100644 --- a/src/components/icons/AvatarIcon.test.tsx +++ b/src/components/icons/AvatarIcon.test.tsx @@ -1,5 +1,6 @@ import { MarkGithubIcon } from '@primer/octicons-react'; import { render } from '@testing-library/react'; +import { Size } from '../../types'; import { AvatarIcon, type IAvatarIcon } from './AvatarIcon'; describe('components/icons/AvatarIcon.tsx', () => { @@ -8,7 +9,7 @@ describe('components/icons/AvatarIcon.tsx', () => { defaultIcon: MarkGithubIcon, title: 'test', url: 'https://avatars.githubusercontent.com/u/583231?v=4', - size: 'small', + size: Size.XSMALL, }; const tree = render(); expect(tree).toMatchSnapshot(); @@ -19,7 +20,18 @@ describe('components/icons/AvatarIcon.tsx', () => { defaultIcon: MarkGithubIcon, title: 'test', url: 'https://avatars.githubusercontent.com/u/583231?v=4', - size: 'medium', + size: Size.MEDIUM, + }; + const tree = render(); + expect(tree).toMatchSnapshot(); + }); + + it('should render medium avatar', () => { + const props: IAvatarIcon = { + defaultIcon: MarkGithubIcon, + title: 'test', + url: 'https://avatars.githubusercontent.com/u/583231?v=4', + size: Size.XLARGE, }; const tree = render(); expect(tree).toMatchSnapshot(); @@ -30,7 +42,7 @@ describe('components/icons/AvatarIcon.tsx', () => { defaultIcon: MarkGithubIcon, title: 'test', url: null, - size: 'small', + size: Size.XSMALL, }; const tree = render(); expect(tree).toMatchSnapshot(); diff --git a/src/components/icons/AvatarIcon.tsx b/src/components/icons/AvatarIcon.tsx index 08881ec76..b867a733f 100644 --- a/src/components/icons/AvatarIcon.tsx +++ b/src/components/icons/AvatarIcon.tsx @@ -1,11 +1,12 @@ import type { Icon } from '@primer/octicons-react'; import type { FC } from 'react'; +import { Size } from '../../types'; import { cn } from '../../utils/cn'; export interface IAvatarIcon { title: string; url: string | null; - size: 'small' | 'medium'; + size: Size; defaultIcon: Icon; } @@ -15,7 +16,11 @@ export const AvatarIcon: FC = (props: IAvatarIcon) => { {`${props.title}'s = (props: IAvatarIcon) => { return ( ); diff --git a/src/components/icons/LogoIcon.test.tsx b/src/components/icons/LogoIcon.test.tsx index aadec63e9..def2a6daa 100644 --- a/src/components/icons/LogoIcon.test.tsx +++ b/src/components/icons/LogoIcon.test.tsx @@ -1,4 +1,5 @@ import { fireEvent, render, screen } from '@testing-library/react'; +import { Size } from '../../types'; import { LogoIcon } from './LogoIcon'; describe('components/icons/LogoIcon.tsx', () => { @@ -16,7 +17,7 @@ describe('components/icons/LogoIcon.tsx', () => { it('should click on the logo', () => { const onClick = jest.fn(); - render(); + render(); fireEvent.click(screen.getByLabelText('Gitify Logo')); @@ -24,7 +25,7 @@ describe('components/icons/LogoIcon.tsx', () => { }); it('should render a different size', () => { - const tree = render(); + const tree = render(); expect(tree).toMatchSnapshot(); }); diff --git a/src/components/icons/LogoIcon.tsx b/src/components/icons/LogoIcon.tsx index c5d0bb7ce..3459e02c1 100644 --- a/src/components/icons/LogoIcon.tsx +++ b/src/components/icons/LogoIcon.tsx @@ -1,10 +1,11 @@ import type { FC } from 'react'; +import { Size } from '../../types'; import { cn } from '../../utils/cn'; interface ILogoIcon { isDark?: boolean; onClick?: () => void; - size?: 'small' | 'medium' | 'large'; + size?: Size; } const LIGHT_GRADIENT_START = '#CCCCCC'; @@ -16,12 +17,16 @@ const DARK_GRADIENT_END = '#555B6E'; export const LogoIcon: FC = ({ isDark, onClick, - size = 'medium', + size = Size.MEDIUM, ...props }: ILogoIcon) => ( onClick?.()} xmlns="http://www.w3.org/2000/svg" diff --git a/src/components/icons/PlatformIcon.test.tsx b/src/components/icons/PlatformIcon.test.tsx index 67226fcd5..d1c946fcc 100644 --- a/src/components/icons/PlatformIcon.test.tsx +++ b/src/components/icons/PlatformIcon.test.tsx @@ -1,11 +1,12 @@ import { render } from '@testing-library/react'; +import { Size } from '../../types'; import { type IPlatformIcon, PlatformIcon } from './PlatformIcon'; describe('components/icons/PlatformIcon.tsx', () => { it('should render GitHub Cloud icon', () => { const props: IPlatformIcon = { type: 'GitHub Cloud', - size: 16, + size: Size.MEDIUM, }; const tree = render(); expect(tree).toMatchSnapshot(); @@ -14,7 +15,7 @@ describe('components/icons/PlatformIcon.tsx', () => { it('should render GitHub Enterprise Service icon', () => { const props: IPlatformIcon = { type: 'GitHub Enterprise Server', - size: 16, + size: Size.MEDIUM, }; const tree = render(); expect(tree).toMatchSnapshot(); diff --git a/src/components/icons/PlatformIcon.tsx b/src/components/icons/PlatformIcon.tsx index 0ab949220..3fb341045 100644 --- a/src/components/icons/PlatformIcon.tsx +++ b/src/components/icons/PlatformIcon.tsx @@ -1,10 +1,11 @@ import { MarkGithubIcon, ServerIcon } from '@primer/octicons-react'; import type { FC } from 'react'; +import type { Size } from '../../types'; import type { PlatformType } from '../../utils/auth/types'; export interface IPlatformIcon { type: PlatformType; - size: number; + size: Size; } export const PlatformIcon: FC = (props: IPlatformIcon) => { diff --git a/src/components/icons/__snapshots__/AvatarIcon.test.tsx.snap b/src/components/icons/__snapshots__/AvatarIcon.test.tsx.snap index 61358d069..f455c2b5c 100644 --- a/src/components/icons/__snapshots__/AvatarIcon.test.tsx.snap +++ b/src/components/icons/__snapshots__/AvatarIcon.test.tsx.snap @@ -10,10 +10,10 @@ exports[`components/icons/AvatarIcon.tsx should render default icon when no url class="text-gray-500 dark:text-gray-300" fill="currentColor" focusable="false" - height="14" + height="12" style="display: inline-block; user-select: none; vertical-align: text-bottom; overflow: visible;" viewBox="0 0 16 16" - width="14" + width="12" > test's avatar @@ -106,7 +106,80 @@ exports[`components/icons/AvatarIcon.tsx should render medium avatar 1`] = ` "container":
test's avatar +
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + +exports[`components/icons/AvatarIcon.tsx should render medium avatar 2`] = ` +{ + "asFragment": [Function], + "baseElement": +
+ test's avatar +
+ , + "container":
+ test's avatar
, diff --git a/src/routes/Accounts.tsx b/src/routes/Accounts.tsx index 1d7572e2f..41a859ffa 100644 --- a/src/routes/Accounts.tsx +++ b/src/routes/Accounts.tsx @@ -12,7 +12,7 @@ import { AuthMethodIcon } from '../components/icons/AuthMethodIcon'; import { PlatformIcon } from '../components/icons/PlatformIcon'; import { AppContext } from '../context/App'; import { BUTTON_CLASS_NAME } from '../styles/gitify'; -import type { Account } from '../types'; +import { type Account, Size } from '../types'; import { getAccountUUID } from '../utils/auth/utils'; import { updateTrayIcon, updateTrayTitle } from '../utils/comms'; import { @@ -77,7 +77,7 @@ export const AccountsRoute: FC = () => { title="Open Host" onClick={() => openHost(account.hostname)} > - + {account.platform} - {account.hostname} @@ -88,7 +88,7 @@ export const AccountsRoute: FC = () => { title="Open Developer Settings" onClick={() => openDeveloperSettings(account)} > - + {account.method} @@ -101,7 +101,7 @@ export const AccountsRoute: FC = () => { onClick={() => logoutAccount(account)} > @@ -120,8 +120,11 @@ export const AccountsRoute: FC = () => { title="Login with Personal Access Token" onClick={loginWithPersonalAccessToken} > - - + + diff --git a/src/routes/Login.tsx b/src/routes/Login.tsx index 41e29528c..e6a843f74 100644 --- a/src/routes/Login.tsx +++ b/src/routes/Login.tsx @@ -4,6 +4,7 @@ import { useNavigate } from 'react-router-dom'; import { Button } from '../components/buttons/Button'; import { LogoIcon } from '../components/icons/LogoIcon'; import { AppContext } from '../context/App'; +import { Size } from '../types'; import { showWindow } from '../utils/comms'; export const LoginRoute: FC = () => { @@ -28,7 +29,7 @@ export const LoginRoute: FC = () => { return (
- +
GitHub Notifications
on your menu bar. diff --git a/src/routes/LoginWithOAuthApp.tsx b/src/routes/LoginWithOAuthApp.tsx index 21fe6ac1b..5838e6a89 100644 --- a/src/routes/LoginWithOAuthApp.tsx +++ b/src/routes/LoginWithOAuthApp.tsx @@ -5,7 +5,13 @@ import { Header } from '../components/Header'; import { Button } from '../components/buttons/Button'; import { FieldInput } from '../components/fields/FieldInput'; import { AppContext } from '../context/App'; -import type { ClientID, ClientSecret, Hostname, Token } from '../types'; +import { + type ClientID, + type ClientSecret, + type Hostname, + Size, + type Token, +} from '../types'; import type { LoginOAuthAppOptions } from '../utils/auth/types'; import { getNewOAuthAppURL, @@ -70,7 +76,7 @@ export const LoginWithOAuthApp: FC = () => { label="Create new OAuth App" disabled={!values.hostname} icon={PersonIcon} - size={12} + size={Size.XSMALL} url={getNewOAuthAppURL(values.hostname)} /> on GitHub then paste your @@ -93,7 +99,7 @@ export const LoginWithOAuthApp: FC = () => { label="GitHub Docs" className="mt-2" icon={BookIcon} - size={12} + size={Size.XSMALL} url={Constants.GITHUB_DOCS.OAUTH_URL} /> @@ -102,7 +108,7 @@ export const LoginWithOAuthApp: FC = () => { label="Login" className="mt-2 px-4 py-2 !text-sm" icon={SignInIcon} - size={16} + size={Size.MEDIUM} disabled={submitting || pristine} type="submit" /> @@ -125,7 +131,7 @@ export const LoginWithOAuthApp: FC = () => { return (
- + Login with OAuth App
diff --git a/src/routes/LoginWithPersonalAccessToken.tsx b/src/routes/LoginWithPersonalAccessToken.tsx index dfe7a8026..21faaeb37 100644 --- a/src/routes/LoginWithPersonalAccessToken.tsx +++ b/src/routes/LoginWithPersonalAccessToken.tsx @@ -6,7 +6,7 @@ import { Header } from '../components/Header'; import { Button } from '../components/buttons/Button'; import { FieldInput } from '../components/fields/FieldInput'; import { AppContext } from '../context/App'; -import type { Hostname, Token } from '../types'; +import { type Hostname, Size, type Token } from '../types'; import type { LoginPersonalAccessTokenOptions } from '../utils/auth/types'; import { getNewTokenURL, @@ -76,7 +76,7 @@ export const LoginWithPersonalAccessToken: FC = () => { label="Generate a PAT" disabled={!values.hostname} icon={KeyIcon} - size={12} + size={Size.XSMALL} url={getNewTokenURL(values.hostname)} /> on GitHub and paste above. @@ -100,7 +100,7 @@ export const LoginWithPersonalAccessToken: FC = () => { label="GitHub Docs" className="mt-2" icon={BookIcon} - size={12} + size={Size.XSMALL} url={Constants.GITHUB_DOCS.PAT_URL} />
diff --git a/src/routes/__snapshots__/Accounts.test.tsx.snap b/src/routes/__snapshots__/Accounts.test.tsx.snap index ed3bb523c..30e6212d1 100644 --- a/src/routes/__snapshots__/Accounts.test.tsx.snap +++ b/src/routes/__snapshots__/Accounts.test.tsx.snap @@ -392,10 +392,10 @@ exports[`routes/Accounts.tsx General should render itself & its children 1`] = ` class="mb-2 ml-1" fill="currentColor" focusable="false" - height="10" + height="14" style="display: inline-block; user-select: none; vertical-align: text-bottom; overflow: visible;" viewBox="0 0 16 16" - width="10" + width="14" >