-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStep.tsx
More file actions
28 lines (25 loc) · 856 Bytes
/
Step.tsx
File metadata and controls
28 lines (25 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { mergeClasses } from '@expo/styleguide';
import { PropsWithChildren } from 'react';
import { HEADLINE, P } from '~/ui/components/Text';
type Props = PropsWithChildren<{
label: string;
}>;
export const Step = ({ children, label }: Props) => {
return (
<div data-md="step" className="mt-6 mb-8 flex gap-4">
<HEADLINE
theme="secondary"
className={mergeClasses(
'bg-element mt-1 flex h-7 min-w-[28px] items-center justify-center rounded-full',
label.length >= 3 && 'text-xs!'
)}>
{label}
</HEADLINE>
<div
data-md="step-content"
className="prose-h2:!-mt-1.5 prose-h3:!-mt-1 prose-h4:!-mt-px w-full max-w-[calc(100%-44px)] pt-1.5 [&>*:last-child]:mb-0!">
{typeof children === 'string' ? <P>{children}</P> : children}
</div>
</div>
);
};