Skip to content

Commit 9e9c047

Browse files
authored
refactor: rewrite login forms with primer (#1775)
* refactor: migrate to text inputs to primer Signed-off-by: Adam Setch <[email protected]> * refactor: migrate to text inputs to primer Signed-off-by: Adam Setch <[email protected]> * refactor: migrate to text inputs to primer Signed-off-by: Adam Setch <[email protected]> * refactor: migrate to text inputs to primer Signed-off-by: Adam Setch <[email protected]> --------- Signed-off-by: Adam Setch <[email protected]>
1 parent fcb3044 commit 9e9c047

28 files changed

+2678
-2216
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@
171171
"nprogress": "0.2.0",
172172
"postcss": "8.5.1",
173173
"postcss-loader": "8.1.1",
174-
"react-final-form": "6.5.9",
175174
"rimraf": "6.0.1",
176175
"semver": "7.6.3",
177176
"styled-components": "6.1.14",

pnpm-lock.yaml

Lines changed: 0 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/renderer/components/fields/FieldInput.test.tsx

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/renderer/components/fields/FieldInput.tsx

Lines changed: 0 additions & 57 deletions
This file was deleted.

src/renderer/components/fields/__snapshots__/FieldInput.test.tsx.snap

Lines changed: 0 additions & 114 deletions
This file was deleted.

src/renderer/components/layout/Centered.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@ import type { FC, ReactNode } from 'react';
33

44
interface ICentered {
55
children: ReactNode;
6-
fullHeight?: boolean;
6+
fullHeight: boolean;
77
}
88

9-
export const Centered: FC<ICentered> = ({
10-
fullHeight = true,
11-
...props
12-
}: ICentered) => {
9+
export const Centered: FC<ICentered> = (props: ICentered) => {
1310
return (
1411
<Stack
1512
direction="vertical"
1613
align="center"
1714
justify="center"
1815
padding="spacious"
19-
className={fullHeight && 'h-screen'}
16+
className={props.fullHeight && 'h-screen'}
2017
>
2118
{props.children}
2219
</Stack>
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
import { Box } from '@primer/react';
12
import type { FC, ReactNode } from 'react';
23

34
interface IContents {
45
children: ReactNode;
56
}
67

78
export const Contents: FC<IContents> = (props: IContents) => {
8-
return <div className="grow overflow-x-auto px-8 pb-4">{props.children}</div>;
9+
return (
10+
<Box className="grow overflow-x-auto px-8 pb-2 mb-12 ">
11+
{props.children}
12+
</Box>
13+
);
914
};

src/renderer/components/layout/Page.test.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,8 @@ import { render } from '@testing-library/react';
22
import { Page } from './Page';
33

44
describe('renderer/components/layout/Page.tsx', () => {
5-
it('should render itself & its children - full', () => {
6-
const tree = render(
7-
<Page id="test" type="h-full">
8-
Test
9-
</Page>,
10-
);
11-
12-
expect(tree).toMatchSnapshot();
13-
});
14-
15-
it('should render itself & its children - screen', () => {
16-
const tree = render(
17-
<Page id="test" type="h-screen">
18-
Test
19-
</Page>,
20-
);
5+
it('should render itself & its children', () => {
6+
const tree = render(<Page id="test">Test</Page>);
217

228
expect(tree).toMatchSnapshot();
239
});
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1+
import { Box } from '@primer/react';
12
import type { FC, ReactNode } from 'react';
2-
import { cn } from '../../utils/cn';
33

44
interface IPage {
55
children: ReactNode;
66
id: string;
7-
type: 'h-full' | 'h-screen';
87
}
98

109
export const Page: FC<IPage> = (props: IPage) => {
1110
return (
12-
<div className={cn('flex flex-col', props.type)} data-testid={props.id}>
11+
<Box className="flex flex-col h-screen" data-testid={props.id}>
1312
{props.children}
14-
</div>
13+
</Box>
1514
);
1615
};

src/renderer/components/layout/__snapshots__/Contents.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)