Skip to content

Commit d44a122

Browse files
committed
refactor: migrate to text inputs to primer
Signed-off-by: Adam Setch <[email protected]>
1 parent ff1b12e commit d44a122

25 files changed

+2541
-2158
lines changed

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.
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.

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

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

0 commit comments

Comments
 (0)