Skip to content

Commit e76a11c

Browse files
authored
Interaction area: UI consistency (#23)
1 parent 6dbabf3 commit e76a11c

File tree

5 files changed

+10
-15
lines changed

5 files changed

+10
-15
lines changed

.prettierrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ semi: true
88
singleQuote: true
99
jsxSingleQuote: true
1010
bracketSpacing: false
11+
12+
tailwindFunctions: ['clsx']

src/components/icons/SkeletonIcon.tsx

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

src/components/icons/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
export {PlayIcon} from './PlayIcon';
2-
export {SkeletonIcon} from './SkeletonIcon';

src/components/pages/SynthPage/SynthPageLayout.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ type SynthPageLayoutProps = {
55
export function SynthPageLayout({children}: SynthPageLayoutProps) {
66
return (
77
<div className='flex min-h-screen flex-col items-center justify-center'>
8-
<div className='max-w-full px-4 pt-8'>{children[0]}</div>
9-
<div className='max-w-full px-4 pt-16'>{children[1]}</div>
8+
<div className='flex w-full items-center justify-center px-4 pt-8'>
9+
{children[0]}
10+
</div>
11+
<div className='flex w-full items-center justify-center px-4 pt-16'>
12+
{children[1]}
13+
</div>
1014
</div>
1115
);
1216
}

src/components/ui/InteractionArea.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import clsx from 'clsx';
22
import {type ComponentProps} from 'react';
3-
import {SkeletonIcon} from '@/components/icons';
43

54
type DivProps = ComponentProps<'div'>;
65

@@ -10,7 +9,7 @@ type InteractionAreaProps = Omit<DivProps, 'className' | 'children'> & {
109
};
1110

1211
const baseClass = clsx(
13-
'flex select-none flex-col items-center gap-1 rounded-md border border-dashed border-gray-4 p-4 text-center text-gray-5 sm:p-8',
12+
'flex h-32 w-full max-w-md select-none flex-col items-center justify-center gap-1 rounded-md border border-dashed border-gray-4 p-4 text-center text-gray-5 sm:p-8',
1413
);
1514

1615
export function InteractionArea({icon, title, ...rest}: InteractionAreaProps) {
@@ -25,8 +24,7 @@ export function InteractionArea({icon, title, ...rest}: InteractionAreaProps) {
2524
export function InteractionAreaSkeleton() {
2625
return (
2726
<div className={baseClass}>
28-
<SkeletonIcon />
29-
<div className='h-6 w-80 max-w-full bg-gray-5 motion-safe:animate-pulse' />
27+
<div className='h-full w-full bg-gray-5 motion-safe:animate-pulse' />
3028
</div>
3129
);
3230
}

0 commit comments

Comments
 (0)