Skip to content

Commit 5c707ec

Browse files
committed
refactor: organise layout components
1 parent 23d45d4 commit 5c707ec

32 files changed

+1167
-689
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { styled } from 'leather-styles/jsx';
2+
import { HTMLStyledProps } from 'leather-styles/types';
3+
import { ImageSizeProps } from '~/utils/types';
4+
5+
export function AlexLogo(props: HTMLStyledProps<'img'> & ImageSizeProps) {
6+
return (
7+
<styled.img
8+
width={props.size ?? props.width}
9+
height={props.size ?? props.height}
10+
src="icons/alex.svg"
11+
alt="Alex Logo"
12+
{...props}
13+
/>
14+
);
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { styled } from 'leather-styles/jsx';
2+
import { HTMLStyledProps } from 'leather-styles/types';
3+
import { ImageSizeProps } from '~/utils/types';
4+
5+
export function BitflowLogo(props: HTMLStyledProps<'img'> & ImageSizeProps) {
6+
return (
7+
<styled.img
8+
width={props.size ?? props.width}
9+
height={props.size ?? props.height}
10+
src="icons/bitflow.png"
11+
alt="Bitflow Logo"
12+
{...props}
13+
/>
14+
);
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { styled } from 'leather-styles/jsx';
2+
import { HTMLStyledProps } from 'leather-styles/types';
3+
import { ImageSizeProps } from '~/utils/types';
4+
5+
export function SbtcLogo(props: HTMLStyledProps<'img'> & ImageSizeProps) {
6+
return (
7+
<styled.img
8+
width={props.size ?? props.width}
9+
height={props.size ?? props.height}
10+
src="icons/sbtc.svg"
11+
alt="Sbtc Logo"
12+
{...props}
13+
/>
14+
);
15+
}

apps/web/app/components/icons/sbtc-icon.tsx renamed to apps/web/app/components/icons/sbtc-monogram-icon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { HTMLStyledProps, styled } from 'leather-styles/jsx';
22

3-
export function SbtcIcon(props: HTMLStyledProps<'svg'>) {
3+
export function SbtcMonogramIcon(props: HTMLStyledProps<'svg'>) {
44
return (
55
<styled.svg
66
xmlns="http://www.w3.org/2000/svg"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { styled } from 'leather-styles/jsx';
2+
import { HTMLStyledProps } from 'leather-styles/types';
3+
import { ImageSizeProps } from '~/utils/types';
4+
5+
export function VelarLogo(props: HTMLStyledProps<'img'> & ImageSizeProps) {
6+
return (
7+
<styled.img
8+
width={props.size ?? props.width}
9+
height={props.size ?? props.height}
10+
src="icons/velar.png"
11+
alt="Velar Logo"
12+
{...props}
13+
/>
14+
);
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { styled } from 'leather-styles/jsx';
2+
import { HTMLStyledProps } from 'leather-styles/types';
3+
import { ImageSizeProps } from '~/utils/types';
4+
5+
export function ZestLogo(props: HTMLStyledProps<'img'> & ImageSizeProps) {
6+
return (
7+
<styled.img
8+
width={props.size ?? props.width}
9+
height={props.size ?? props.height}
10+
src="icons/zest.svg"
11+
alt="Zest Logo"
12+
{...props}
13+
/>
14+
);
15+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Flex, FlexProps, Grid, GridProps } from 'leather-styles/jsx';
2+
3+
// This component is intended to share styles only. No layout based assumptions
4+
// should be made.
5+
export function InfoGrid(props: GridProps) {
6+
return (
7+
<Grid
8+
border="default"
9+
borderWidth="1px"
10+
borderRadius="sm"
11+
overflow="hidden"
12+
gap="1px"
13+
bg="ink.border-default"
14+
{...props}
15+
/>
16+
);
17+
}
18+
19+
export function InfoGridCell(props: FlexProps) {
20+
return <Flex flexDir="column" bg="ink.background-primary" {...props} />;
21+
}
22+
23+
InfoGrid.Cell = InfoGridCell;

apps/web/app/components/layouts/primary-cell-five-grid.layout.tsx

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

apps/web/app/components/layouts/primary-cell-three-grid.layout.tsx

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

apps/web/app/features/page/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { WhenClient } from '~/components/client-only';
44

55
import { SignInButton } from '../sign-in-button/sign-in-button';
66

7-
export const insetPageMarginX = css({ mx: ['-space.04', '-space.05', '-space.07'] });
7+
export const insetPageMarginX = css({ mx: ['-space.04', '-space.05', '-space.06'] });
88

99
export function Page(props: HTMLStyledProps<'div'>) {
10-
return <styled.main mx={['space.04', 'space.05', 'space.07']} {...props} />;
10+
return <styled.main mx={['space.04', 'space.05', 'space.06']} {...props} />;
1111
}
1212

1313
export function PageInset(props: HTMLStyledProps<'div'>) {
@@ -27,7 +27,7 @@ export function PageHeader({ title }: PageHeaderProps) {
2727
borderBottom="default"
2828
alignItems="center"
2929
>
30-
<styled.h1 textStyle="heading.05" mx={['space.04', 'space.05', 'space.05']}>
30+
<styled.h1 textStyle="heading.05" mx={['space.04', 'space.05', 'space.06']}>
3131
{title}
3232
</styled.h1>
3333

0 commit comments

Comments
 (0)