Skip to content

Commit

Permalink
fixed types
Browse files Browse the repository at this point in the history
  • Loading branch information
agnieszkajarosikloj committed Mar 13, 2023
1 parent 2943a33 commit 6972c32
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 175 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,7 @@
border-radius: 12px;
text-align: center;
}

.paddingSmall {
padding-top: 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ export const buttonTooltip: string;
export const cancelIcon: string;
export const claimed: string;
export const tagStagesWrapper: string;
export const paddingSmall: string;
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ const Stages = ({
status !== Status.Cancelled;

return (
<div className={styles.mainContainer}>
<div
className={classNames(styles.mainContainer, {
[styles.paddingSmall]: viewFor === 'incorporation',
})}
>
{claimFundsVisible && formValues && (
<>
{formValues.expenditure === ExpenditureTypes.Advanced ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ export const additionalText: string;
export const additionalMargin: string;
export const radioWrapper: string;
export const selected: string;
export const mianContactWrapper: string;
export const fadeIn: string;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { supRenderAvatar } from '~dashboard/ExpenditurePage/Recipient/Recipient'
import { Protector } from '~pages/IncorporationPage/types';
import Button from '~core/Button';
import Link from '~core/Link';
import { Protector } from '~pages/IncorporationPage/types';

import SingleUserPicker from '../SingleUserPicker';
import { SignOption } from '../constants';
Expand Down Expand Up @@ -181,71 +180,82 @@ const Protectors = ({ colony, sidebarRef }: Props) => {
/>
</div>
</FormSection>
<div className={styles.mianContactWrapper}>
{shouldShowMainContact && mainContactData && (
<FormSection appearance={{ border: 'bottom' }}>
<div className={styles.wrapper}>
<div
className={classNames(
styles.labelWrapper,
styles.additionalPaddign,
)}
>
<InputLabel label={MSG.mainContact} />
<QuestionMarkTooltip tooltipText={MSG.mainContactTooltip} />
</div>
<div className={styles.mainContactWrapper}>
<div className={styles.selectWrapper}>
<UserPickerWithSearch
data={mainContactData}
label=""
name="mainContact"
filter={filterUserSelection}
renderAvatar={supRenderAvatar}
placeholder="Search"
sidebarRef={sidebarRef}
disabled={!protectors}
/>
{error && typeof error === 'object' && touched && (
<div className={styles.error}>{formatMessage(error)}</div>
)}
</div>
<Icon
name="trash"
className={styles.deleteIcon}
onClick={() => setMainContact(undefined)}
title={MSG.deleteIconTitle}
/>
</div>
</div>
</FormSection>
)}
{shouldShowMainContact && (
<div className={styles.signOptionWrapper}>
{shouldShowMainContact && mainContactData && (
<FormSection appearance={{ border: 'bottom' }}>
<div className={styles.wrapper}>
<div
className={classNames(
styles.labelWrapper,
styles.additionalMargin,
styles.additionalPaddign,
)}
>
<InputLabel label={MSG.signOptionLabel} />
<QuestionMarkTooltip tooltipText={MSG.signOptionTooltip} />
<InputLabel label={MSG.mainContact} />
<QuestionMarkTooltip tooltipText={MSG.mainContactTooltip} />
</div>
<div className={styles.mainContactWrapper}>
<div className={styles.selectWrapper}>
<UserPickerWithSearch
data={mainContactData}
label=""
name="mainContact"
filter={filterUserSelection}
renderAvatar={supRenderAvatar}
placeholder="Search"
sidebarRef={sidebarRef}
disabled={!protectors}
/>
{error && typeof error === 'object' && touched && (
<div className={styles.error}>{formatMessage(error)}</div>
)}
</div>
<Icon
name="trash"
className={styles.deleteIcon}
onClick={() => setMainContact(undefined)}
title={MSG.deleteIconTitle}
/>
</div>
</div>
</FormSection>
)}
{shouldShowMainContact && (
<div className={styles.signOptionWrapper}>
<div
className={classNames(styles.labelWrapper, styles.additionalMargin)}
>
<InputLabel label={MSG.signOptionLabel} />
<QuestionMarkTooltip tooltipText={MSG.signOptionTooltip} />
</div>
<div
className={classNames(styles.radioWrapper, {
[styles.selected]: signOption === SignOption.Individual,
})}
>
<Radio
checked={signOption === SignOption.Individual}
name="signOption"
label={MSG.individual}
value={SignOption.Individual}
/>
elementOnly
>
<FormattedMessage {...MSG.individual} />
</Radio>
</div>
<div
className={classNames(styles.radioWrapper, {
[styles.selected]: signOption === SignOption.Multiple,
})}
>
<Radio
checked={signOption === SignOption.Multiple}
name="signOption"
label={MSG.multiple}
value={SignOption.Multiple}
/>
elementOnly
>
<FormattedMessage {...MSG.multiple} />
</Radio>
</div>
)}
</div>
</div>
)}
</>
);
};
Expand Down
106 changes: 0 additions & 106 deletions src/modules/dashboard/components/Incorporation/Stages/FormStages.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
height: 100%;
}

.titleCommentsContainer {
min-width: 458px;
}

.sidebar {
height: 600px;
min-height: calc(100vh - navBarHeight);
Expand All @@ -36,6 +32,7 @@
}

.mainContainer {
padding: 52px 100px 70px 25px;
padding-bottom: 50px;
height: 600px;
min-height: 100%;
Expand All @@ -51,6 +48,10 @@
min-height: calc(100vh - navBarHeight);
}

.smallerPadding {
padding: 36px 100px 80px 25px;
}

.tagWrapper {
margin-bottom: -30px;
padding: 34px 54px 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export const sidebarWidth: string;
export const navBarHeight: string;
export const main: string;
export const titleCommentsContainer: string;
export const sidebar: string;
export const wrapper: string;
export const spinnerContainer: string;
export const mainContainer: string;
export const mainContent: string;
export const smallerPadding: string;
export const tagWrapper: string;
export const titleCommentsContainer: string;
Loading

0 comments on commit 6972c32

Please sign in to comment.