Skip to content

Commit

Permalink
Remove chevrons (#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoontek authored Dec 3, 2024
1 parent e4b274a commit 7b32983
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 225 deletions.
12 changes: 6 additions & 6 deletions clients/banking/src/components/AccountStatementCustom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ const columns: ColumnConfig<Statement, ExtraInfo>[] = [
},
},
{
title: t("accountStatements.action"),
width: 90,
id: "action",
renderTitle: ({ title }) => <HeaderCell text={title} align="center" />,
width: 40,
id: "actions",
title: "",
renderTitle: () => null,
renderCell: ({ item: { status } }) => {
return status === "Available" ? (
<Cell align="center">
Expand All @@ -177,9 +177,9 @@ const smallColumns: ColumnConfig<Statement, ExtraInfo>[] = [
},
},
{
title: t("accountStatements.action"),
width: 50,
width: 40,
id: "actions",
title: "",
renderTitle: () => null,
renderCell: ({ item: { status } }) => {
return (
Expand Down
12 changes: 6 additions & 6 deletions clients/banking/src/components/AccountStatementMonthly.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ const columns: ColumnConfig<Statement, ExtraInfo>[] = [
},
},
{
title: t("accountStatements.action"),
width: 90,
id: "action",
renderTitle: ({ title }) => <HeaderCell align="center" text={title} />,
width: 40,
id: "actions",
title: "",
renderTitle: () => null,
renderCell: ({ item: { status } }) => {
return status === "Available" ? (
<Cell align="center">
Expand All @@ -110,9 +110,9 @@ const smallColumns: ColumnConfig<Statement, ExtraInfo>[] = [
),
},
{
title: t("accountStatements.action"),
width: 50,
width: 40,
id: "actions",
title: "",
renderTitle: () => null,
renderCell: ({ item: { status } }) => {
return (
Expand Down
17 changes: 1 addition & 16 deletions clients/banking/src/components/BeneficiaryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { EmptyView } from "@swan-io/lake/src/components/EmptyView";
import { Fill } from "@swan-io/lake/src/components/Fill";
import { FilterChooser } from "@swan-io/lake/src/components/FilterChooser";
import { FocusTrapRef } from "@swan-io/lake/src/components/FocusTrap";
import { Icon, IconName } from "@swan-io/lake/src/components/Icon";
import { IconName } from "@swan-io/lake/src/components/Icon";
import { LakeButton } from "@swan-io/lake/src/components/LakeButton";
import { LakeSearchField } from "@swan-io/lake/src/components/LakeSearchField";
import { LakeText } from "@swan-io/lake/src/components/LakeText";
Expand Down Expand Up @@ -272,21 +272,6 @@ const columns: ColumnConfig<Beneficiary, undefined>[] = [
</Cell>
),
},
{
id: "actions",
width: 48,
title: "",
renderTitle: () => null,
renderCell: ({ isHovered }) => (
<Cell align="right">
<Icon
name="chevron-right-filled"
color={isHovered ? colors.gray[900] : colors.gray[500]}
size={16}
/>
</Cell>
),
},
];

const beneficiaryTypes = deriveUnion<Exclude<BeneficiaryType, "Internal">>({
Expand Down
2 changes: 1 addition & 1 deletion clients/banking/src/components/CardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ const columns: ColumnConfig<CardListItemFragment, ExtraInfo>[] = [
renderCell: ({ item }) => <CardStatusCell card={item} />,
},
{
width: 40,
id: "actions",
width: 64,
title: "",
renderTitle: () => null,
renderCell: ({ item, extraInfo: { onPressCancel }, isHovered }) => (
Expand Down
56 changes: 22 additions & 34 deletions clients/banking/src/components/CardListCells.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export const CardStatusCell = ({ card }: { card: Card }) => {

export const CardSummaryCell = ({ card }: { card: Card }) => {
const spendingLimits = card.spendingLimits ?? [];

return (
<Cell>
<View>
Expand Down Expand Up @@ -341,9 +342,6 @@ export const CardSummaryCell = ({ card }: { card: Card }) => {
))
.exhaustive()}
</Box>

<Space width={12} />
<Icon name="chevron-right-filled" size={16} color={colors.gray[500]} />
</Cell>
);
};
Expand All @@ -363,40 +361,30 @@ export const CardActionsCell = ({
.with(
{ __typename: P.not(P.union("CardCanceledStatusInfo", "CardCancelingStatusInfo")) },
() => (
<>
<Pressable
onPress={event => {
event.stopPropagation();
event.preventDefault();
onPressCancel({ cardId: card.id });
}}
>
{({ hovered }) => (
<Icon
name="subtract-circle-regular"
color={
hovered
? colors.negative[500]
: isRowHovered
? colors.gray[700]
: colors.gray[500]
}
size={16}
/>
)}
</Pressable>

<Space width={8} />
</>
<Pressable
onPress={event => {
event.stopPropagation();
event.preventDefault();
onPressCancel({ cardId: card.id });
}}
>
{({ hovered }) => (
<Icon
name="subtract-circle-regular"
color={
hovered
? colors.negative[500]
: isRowHovered
? colors.gray[700]
: colors.gray[500]
}
size={16}
/>
)}
</Pressable>
),
)
.otherwise(() => null)}

<Icon
name="chevron-right-filled"
color={isRowHovered ? colors.gray[900] : colors.gray[500]}
size={16}
/>
</Cell>
);
};
2 changes: 1 addition & 1 deletion clients/banking/src/components/MembershipList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ const columns: ColumnConfig<AccountMembershipFragment, ExtraInfo>[] = [
renderCell: ({ item }) => <PhoneNumberCell accountMembership={item} />,
},
{
width: 40,
id: "actions",
width: 64,
title: "",
renderTitle: () => null,
renderCell: ({
Expand Down
55 changes: 21 additions & 34 deletions clients/banking/src/components/MembershipListCells.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,6 @@ export const MembershipSummaryCell = ({
<Fill minWidth={16} />

{getStatusIcon({ accountMembership })}

<Space width={8} />
<Icon name="chevron-right-filled" color={colors.gray[200]} size={16} />
</Cell>
);
};
Expand Down Expand Up @@ -414,42 +411,32 @@ export const MembershipActionsCell = ({
isCurrentUserMembership: false,
},
({ accountMembership: { id: accountMembershipId } }) => (
<>
<Pressable
onPress={event => {
event.stopPropagation();
event.preventDefault();
onPressCancel({ accountMembershipId });
}}
>
{({ hovered }) => (
<Icon
name="subtract-circle-regular"
color={
hovered
? colors.negative[500]
: isRowHovered
? colors.gray[700]
: colors.gray[500]
}
size={16}
/>
)}
</Pressable>

<Space width={8} />
</>
<Pressable
onPress={event => {
event.stopPropagation();
event.preventDefault();
onPressCancel({ accountMembershipId });
}}
>
{({ hovered }) => (
<Icon
name="subtract-circle-regular"
color={
hovered
? colors.negative[500]
: isRowHovered
? colors.gray[700]
: colors.gray[500]
}
size={16}
/>
)}
</Pressable>
),
)
.otherwise(() => (
<Space width={24} />
))}

<Icon
name="chevron-right-filled"
color={isRowHovered ? colors.gray[900] : colors.gray[500]}
size={16}
/>
</Cell>
);
};
31 changes: 0 additions & 31 deletions clients/banking/src/components/MerchantList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Box } from "@swan-io/lake/src/components/Box";
import { Cell, HeaderCell, TextCell } from "@swan-io/lake/src/components/Cells";
import { EmptyView } from "@swan-io/lake/src/components/EmptyView";
import { Fill } from "@swan-io/lake/src/components/Fill";
import { Icon } from "@swan-io/lake/src/components/Icon";
import { LakeButton } from "@swan-io/lake/src/components/LakeButton";
import { LoadingView } from "@swan-io/lake/src/components/LoadingView";
import { ColumnConfig, PlainListView } from "@swan-io/lake/src/components/PlainListView";
Expand Down Expand Up @@ -99,21 +98,6 @@ const columns: ColumnConfig<MerchantProfileFragment, ExtraInfo>[] = [
</Cell>
),
},
{
id: "actions",
width: 42,
title: "",
renderTitle: () => null,
renderCell: ({ isHovered }) => (
<Cell align="right">
<Icon
name="chevron-right-filled"
color={isHovered ? colors.gray[900] : colors.gray[500]}
size={16}
/>
</Cell>
),
},
];

const smallColumns: ColumnConfig<MerchantProfileFragment, ExtraInfo>[] = [
Expand Down Expand Up @@ -147,21 +131,6 @@ const smallColumns: ColumnConfig<MerchantProfileFragment, ExtraInfo>[] = [
</Cell>
),
},
{
id: "actions",
width: 42,
title: "",
renderTitle: () => null,
renderCell: ({ isHovered }) => (
<Cell align="right">
<Icon
name="chevron-right-filled"
color={isHovered ? colors.gray[900] : colors.gray[500]}
size={16}
/>
</Cell>
),
},
];

export const MerchantList = ({ accountId, accountMembershipId, params, large }: Props) => {
Expand Down
31 changes: 0 additions & 31 deletions clients/banking/src/components/MerchantProfilePaymentLinksList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Cell, CopyableTextCell, HeaderCell, TextCell } from "@swan-io/lake/src/components/Cells";
import { EmptyView } from "@swan-io/lake/src/components/EmptyView";
import { Icon } from "@swan-io/lake/src/components/Icon";
import { LakeText } from "@swan-io/lake/src/components/LakeText";
import { ColumnConfig, PlainListView } from "@swan-io/lake/src/components/PlainListView";
import { Tag } from "@swan-io/lake/src/components/Tag";
Expand Down Expand Up @@ -102,21 +101,6 @@ const columns: ColumnConfig<PaymentLinkFragment, ExtraInfo>[] = [
/>
),
},
{
width: 48,
id: "actions",
title: "",
renderTitle: () => null,
renderCell: ({ isHovered }) => (
<Cell align="right">
<Icon
name="chevron-right-filled"
color={isHovered ? colors.gray[900] : colors.gray[500]}
size={16}
/>
</Cell>
),
},
];

const smallColumns: ColumnConfig<PaymentLinkFragment, ExtraInfo>[] = [
Expand Down Expand Up @@ -148,21 +132,6 @@ const smallColumns: ColumnConfig<PaymentLinkFragment, ExtraInfo>[] = [
</Cell>
),
},
{
width: 48,
id: "actions",
title: "",
renderTitle: () => null,
renderCell: ({ isHovered }) => (
<Cell align="right">
<Icon
name="chevron-right-filled"
color={isHovered ? colors.gray[700] : colors.gray[200]}
size={16}
/>
</Cell>
),
},
];

type Props = {
Expand Down
Loading

0 comments on commit 7b32983

Please sign in to comment.