Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
fix: inline styles
Browse files Browse the repository at this point in the history
  • Loading branch information
nmashchenko committed Dec 6, 2023
1 parent 7d8fc27 commit 45c3646
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
3 changes: 3 additions & 0 deletions client/src/app/onboarding/onboarding.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.spacer {
margin-bottom: 32px;
}
9 changes: 6 additions & 3 deletions client/src/app/onboarding/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
import { Flex } from '@/shared/ui';
import { ProgressSection } from '@/app/onboarding/ui/progress-section/progress-section';
import { ActionSection } from '@/app/onboarding/ui/action-section/action-section';
import styles from './onboarding.module.scss';

const OnboardingPage = () => {
return (
<Flex width={'100vw'} height={'100dvh'}>
<ProgressSection>
<Flex style={{ flex: 1, flexDirection: 'column' }}>
<div style={{ flex: 1, display: 'flex', alignItems: 'center' }}>Image</div>
<div style={{ marginBottom: '32px' }}>Description</div>
<Flex direction='column' flex={1}>
<Flex align='center' flex={1}>
Image
</Flex>
<div className={styles.spacer}>Description</div>
</Flex>
</ProgressSection>
<ActionSection stepTitle={'Step Title'}>ActionSection</ActionSection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Button, Flex, Typography } from '@/shared/ui';
import { ReactNode } from 'react';
import { ArrowLeft, ArrowRight } from '@/shared/assets';
import styles from './action-section.module.scss';
import { NeedHelp } from '../../../../shared/ui/need-help';
import { NeedHelp } from '@/shared/ui/need-help';

interface ActionSectionProps {
children: ReactNode;
Expand All @@ -18,11 +18,11 @@ export const ActionSection = ({ children, stepTitle }: ActionSectionProps) => {
</Typography>
<NeedHelp />
</Flex>
<div style={{ flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Flex flex={1} align='center' justify='center'>
{children}
</div>
</Flex>
<Flex justify={'space-between'}>
<Button className={styles.button} typeBtn={'secondary'}>
<Button className={styles.button} typeBtn='secondary'>
<ArrowLeft />
Back
</Button>
Expand Down
4 changes: 4 additions & 0 deletions client/src/shared/ui/flex/flex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ export interface FlexProps extends React.HTMLAttributes<HTMLDivElement> {
* props.className - Additional classnames you want to add to flex if needed
*/
className?: string;

flex?: string | number | undefined;
}

/**
Expand Down Expand Up @@ -114,6 +116,7 @@ export const Flex: React.FC<FlexProps> = props => {
shrink,
children,
className,
flex,
...rest
} = props;

Expand All @@ -131,6 +134,7 @@ export const Flex: React.FC<FlexProps> = props => {
flexWrap: wrap,
height: height,
flexShrink: shrink,
flex: flex,
} as React.CSSProperties;

return (
Expand Down

0 comments on commit 45c3646

Please sign in to comment.