Skip to content

Commit 33bbf4a

Browse files
fix: datatable text (#1050)
1 parent 031cd0d commit 33bbf4a

File tree

8 files changed

+45
-26
lines changed

8 files changed

+45
-26
lines changed

sdks/js/packages/core/react/components/organization/api-keys/columns.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ export const getColumns = ({
2727
}}
2828
style={{
2929
textDecoration: 'none',
30-
color: 'var(--rs-color-foreground-base-primary)'
30+
color: 'var(--rs-color-foreground-base-primary)',
31+
fontSize: 'var(--rs-font-size-small)'
3132
}}
3233
>
3334
{getValue()}

sdks/js/packages/core/react/components/organization/api-keys/service-user/projects.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ const getColumns = ({
3535
header: '',
3636
accessorKey: 'id',
3737
enableSorting: false,
38+
styles: {
39+
cell: {
40+
width: 'var(--rs-space-2)'
41+
}
42+
},
3843
cell: ({ getValue }) => {
3944
const projectId = getValue();
4045
const { value, isLoading } = permMap[projectId] || {};
@@ -57,7 +62,11 @@ const getColumns = ({
5762
accessorKey: 'title',
5863
cell: ({ getValue }) => {
5964
const value = getValue();
60-
return <Flex direction="column">{value}</Flex>;
65+
return (
66+
<Flex direction="column">
67+
<Text>{value}</Text>
68+
</Flex>
69+
);
6170
}
6271
},
6372
{

sdks/js/packages/core/react/components/organization/billing/invoices/index.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ export const getColumns: (
5353
cell: ({ row, getValue }) => {
5454
return (
5555
<Flex direction="column">
56-
<Amount
57-
currency={row?.original?.currency}
58-
value={getValue() as number}
59-
/>
56+
<Text>
57+
<Amount
58+
currency={row?.original?.currency}
59+
value={getValue() as number}
60+
/>
61+
</Text>
6062
</Flex>
6163
);
6264
}

sdks/js/packages/core/react/components/organization/domain/domain.columns.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ const DomainActions = ({
7474
<Flex align="center" justify="end" gap={9}>
7575
{domain.state === 'pending' ? (
7676
<Button
77-
variant="solid"
77+
variant="outline"
7878
color="neutral"
79+
size="small"
7980
data-test-id="frontier-sdk-verify-domain-btn-verify"
8081
onClick={() =>
8182
navigate({
@@ -91,10 +92,11 @@ const DomainActions = ({
9192
) : (
9293
<Flex
9394
gap={2}
95+
align="center"
9496
style={{ color: 'var(--rs-color-foreground-success-primary)' }}
9597
>
9698
<CheckCircledIcon style={{ cursor: 'pointer' }} />
97-
Verified
99+
<Text variant="success">Verified</Text>
98100
</Flex>
99101
)}
100102

sdks/js/packages/core/react/components/organization/members/member.columns.tsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
TrashIcon,
44
UpdateIcon
55
} from '@radix-ui/react-icons';
6-
import type { DataTableColumnDef } from '@raystack/apsara/v1';
76
import { useNavigate } from '@tanstack/react-router';
87
import {
98
toast,
@@ -12,7 +11,8 @@ import {
1211
Avatar,
1312
Text,
1413
getAvatarColor,
15-
DropdownMenu
14+
DropdownMenu,
15+
DataTableColumnDef
1616
} from '@raystack/apsara/v1';
1717
import { useFrontier } from '~/react/contexts/FrontierContext';
1818
import type { V1Beta1Policy, V1Beta1Role } from '~/src';
@@ -67,14 +67,18 @@ export const getColumns = (
6767
header: 'Roles',
6868
accessorKey: 'email',
6969
cell: ({ row }) => {
70-
return row.original.invited
71-
? 'Pending Invite'
72-
: (row.original?.id &&
73-
memberRoles[row.original?.id] &&
74-
memberRoles[row.original?.id]
75-
.map((r: V1Beta1Role) => r.title || r.name)
76-
.join(', ')) ??
77-
'Inherited role';
70+
return (
71+
<Text>
72+
{row.original.invited
73+
? 'Pending Invite'
74+
: (row.original?.id &&
75+
memberRoles[row.original?.id] &&
76+
memberRoles[row.original?.id]
77+
.map((r: V1Beta1Role) => r.title || r.name)
78+
.join(', ')) ??
79+
'Inherited role'}
80+
</Text>
81+
);
7882
}
7983
},
8084
{

sdks/js/packages/core/react/components/organization/project/projects.columns.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export const getColumns: (
2323
}}
2424
style={{
2525
textDecoration: 'none',
26-
color: 'var(--rs-color-foreground-base-primary)'
26+
color: 'var(--rs-color-foreground-base-primary)',
27+
fontSize: 'var(--rs-font-size-small)'
2728
}}
2829
>
2930
{getValue() as string}

sdks/js/packages/core/react/components/organization/teams/teams.columns.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ import {
33
Pencil1Icon,
44
TrashIcon
55
} from '@radix-ui/react-icons';
6-
import { Text, DropdownMenu } from '@raystack/apsara/v1';
6+
import { Text, DropdownMenu, DataTableColumnDef } from '@raystack/apsara/v1';
77
import { Link } from '@tanstack/react-router';
88
import type { V1Beta1Group } from '~/src';
99
import styles from '../organization.module.css';
10-
import type { DataTableColumnDef } from '@raystack/apsara/v1';
1110

1211
export const getColumns: (
1312
userAccessOnTeam: Record<string, string[]>
@@ -23,7 +22,8 @@ export const getColumns: (
2322
}}
2423
style={{
2524
textDecoration: 'none',
26-
color: 'var(--rs-color-foreground-base-primary)'
25+
color: 'var(--rs-color-foreground-base-primary)',
26+
fontSize: 'var(--rs-font-size-small)'
2727
}}
2828
>
2929
{getValue() as string}

sdks/js/packages/core/react/components/organization/tokens/transactions/columns.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const getColumns: (
3434
const value = getValue() as string;
3535
return (
3636
<Flex direction="column">
37-
<Text variant="secondary" size="regular">
37+
<Text variant="secondary">
3838
{dayjs(value).format(dateFormat)}
3939
</Text>
4040
</Flex>
@@ -49,7 +49,7 @@ export const getColumns: (
4949
const prefix = row?.original?.type === 'credit' ? '+' : '-';
5050
return (
5151
<Flex direction="column">
52-
<Text variant="secondary" size="regular">
52+
<Text variant="secondary">
5353
{prefix}
5454
{value}
5555
</Text>
@@ -72,7 +72,7 @@ export const getColumns: (
7272
) as string;
7373
return (
7474
<Flex direction="column">
75-
<Text variant="secondary" size="regular">
75+
<Text variant="secondary">
7676
{eventName || '-'}
7777
</Text>
7878
</Flex>
@@ -96,7 +96,7 @@ export const getColumns: (
9696
radius="small"
9797
color={color}
9898
/>
99-
<Text size="regular">{userTitle}</Text>
99+
<Text>{userTitle}</Text>
100100
</Flex>
101101
);
102102
}

0 commit comments

Comments
 (0)