Skip to content

Commit 6af3291

Browse files
committed
feat: table styles
1 parent 184e2bb commit 6af3291

29 files changed

Lines changed: 389 additions & 353 deletions

File tree

features/create-vault/create-vault-form/stages/confirmation/confirmation-entry/confirmation-entry.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { FC } from 'react';
22
import { useFormContext } from 'react-hook-form';
33

4-
import { Hint } from 'features/create-vault/shared/hint';
4+
import { Hint } from 'shared/components';
55

66
import { ConfirmAddress, ConfirmAddressArray } from './confirm-address';
77
import { ConfirmNumber } from './confirm-number';

features/create-vault/create-vault-form/stages/main-settings/create-vault-input/create-vault-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { FC } from 'react';
2-
import { Hint } from 'features/create-vault/shared/hint';
2+
import { Hint } from 'shared/components';
33

44
import { GeneralInput, GeneralInputProps } from './general-input';
55
import { AddressInput } from './address-input';

features/create-vault/create-vault-form/stages/main-settings/create-vault-input/styles.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import styled from 'styled-components';
2-
import { ButtonIcon, Checkbox, Question } from '@lidofinance/lido-ui';
2+
import { ButtonIcon, Checkbox } from '@lidofinance/lido-ui';
33

44
/// CreateVaultInput
55

@@ -18,13 +18,6 @@ export const InputTitle = styled.p`
1818
display: inline-flex;
1919
`;
2020

21-
export const QuestionIcon = styled(Question)`
22-
width: 20px;
23-
height: 20px;
24-
fill: ${({ theme }) => theme.colors.textSecondary};
25-
align-self: center;
26-
`;
27-
2821
export const InputNotes = styled.p`
2922
font-size: ${({ theme }) => theme.fontSizesMap.xxs}px;
3023
font-weight: 400;

features/create-vault/shared/hint.tsx

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

features/home/components/vault-table/cells/address-cell.tsx

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

features/home/components/vault-table/cells/default-cell.tsx

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

features/home/components/vault-table/cells/ether-cell.tsx

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
import { FC } from 'react';
22

3-
import { Question } from '@lidofinance/lido-ui';
4-
import { CommonHeader } from 'features/home/components/vault-table/styles';
3+
import { Hint } from 'shared/components';
4+
import { ArrowAnimated, CommonHeader } from './styles';
55

6-
export interface HeaderCellProps {
6+
type SortDirection = 'asc' | 'desc';
7+
8+
export type HeaderCellProps = {
79
title: string;
8-
showQuestion?: boolean;
9-
}
10+
hint?: string;
11+
onSort?: (dir: SortDirection) => void;
12+
sortDirection?: SortDirection;
13+
};
1014

11-
export const HeaderCell: FC<HeaderCellProps> = (props) => {
12-
const { title, showQuestion = true } = props;
15+
export const HeaderCell: FC<HeaderCellProps> = ({
16+
title,
17+
hint,
18+
onSort,
19+
sortDirection,
20+
}) => {
21+
const showSort = !!(onSort && sortDirection);
1322
return (
1423
<CommonHeader>
1524
{title}
16-
{showQuestion && <Question />}
25+
{hint && <Hint text={hint} />}
26+
{showSort && <ArrowAnimated direction={sortDirection} />}
1727
</CommonHeader>
1828
);
1929
};
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
export * from './default-cell';
2-
export * from './address-cell';
3-
export * from './ether-cell';
4-
export * from './mint-cell';
51
export * from './percent-cell';
62
export * from './header-cell';

features/home/components/vault-table/cells/mint-cell.tsx

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

0 commit comments

Comments
 (0)