diff --git a/packages/toolbox-ui/src/components/connections/ConnectionsTable.tsx b/packages/toolbox-ui/src/components/connections/ConnectionsTable.tsx index df2b8f3..9682d41 100644 --- a/packages/toolbox-ui/src/components/connections/ConnectionsTable.tsx +++ b/packages/toolbox-ui/src/components/connections/ConnectionsTable.tsx @@ -1,7 +1,7 @@ import type { ConnectionRecord } from '@aries-framework/core' import { ConnectionsUtil } from '@animo/toolbox-core/src/utils/records/ConnectionsUtil' -import { Badge, Group, ScrollArea, Table, Text, useMantineTheme } from '@mantine/core' +import { Badge, createStyles, Group, ScrollArea, Table, Text, useMantineTheme } from '@mantine/core' import React from 'react' import { RecordActions } from '../RecordActions' @@ -13,18 +13,39 @@ interface ConnectionsTableProps { onAccept: (connection: ConnectionRecord) => void } +const useStyles = createStyles(() => ({ + table: { + width: '100%', + minWidth: 870, + tableLayout: 'fixed', + }, + labelSize: { + width: 150, + }, + idSize: { + width: 200, + }, + stateSize: { + width: 100, + }, + actionsSize: { + width: 160, + }, +})) + export const ConnectionsTable = ({ records, onDelete, onAccept }: ConnectionsTableProps) => { + const { classes } = useStyles() const theme = useMantineTheme() return ( - +
- - - - + + + @@ -34,8 +55,8 @@ export const ConnectionsTable = ({ records, onDelete, onAccept }: ConnectionsTab return ( - - - -
ConnectionConnection IdState + ConnectionConnection IdState
- + + {record.theirLabel} @@ -44,15 +65,15 @@ export const ConnectionsTable = ({ records, onDelete, onAccept }: ConnectionsTab + {record.id} + {record.state} + onAccept(record) : undefined} onDelete={() => onDelete(record)} diff --git a/packages/toolbox-ui/src/components/credentials/CredentialsTable.tsx b/packages/toolbox-ui/src/components/credentials/CredentialsTable.tsx index 9a018c7..e013d11 100644 --- a/packages/toolbox-ui/src/components/credentials/CredentialsTable.tsx +++ b/packages/toolbox-ui/src/components/credentials/CredentialsTable.tsx @@ -2,7 +2,7 @@ import type { ConnectionRecord, CredentialExchangeRecord } from '@aries-framewor import { formatSchemaName } from '@animo/toolbox-core/src/utils' import { CredentialsUtil } from '@animo/toolbox-core/src/utils/records/CredentialsUtil' -import { Badge, Group, ScrollArea, Table, Text, useMantineTheme } from '@mantine/core' +import { Badge, createStyles, Group, ScrollArea, Table, Text, useMantineTheme } from '@mantine/core' import React from 'react' import { useCredentialsFormatData } from '../../contexts/CredentialFormatDataProvider' @@ -17,18 +17,36 @@ interface CredentialsTableProps { onAccept: (credential: CredentialExchangeRecord) => void } +const useStyles = createStyles(() => ({ + table: { + width: '100%', + minWidth: 490, + tableLayout: 'fixed', + }, + labelSize: { + width: 150, + }, + stateSize: { + width: 100, + }, + actionsSize: { + width: 160, + }, +})) + export const CredentialsTable = ({ records, connections, onDelete, onAccept, onDecline }: CredentialsTableProps) => { + const { classes } = useStyles() const theme = useMantineTheme() const { formattedData } = useCredentialsFormatData() return ( - +
- - - + + @@ -41,8 +59,8 @@ export const CredentialsTable = ({ records, connections, onDelete, onAccept, onD return ( - - -
CredentialState + CredentialState
- + + {connection?.theirLabel} @@ -51,10 +69,10 @@ export const CredentialsTable = ({ records, connections, onDelete, onAccept, onD + {record.state} + onAccept(record) : undefined} onDecline={isWaitingForDecline ? () => onDecline(record) : undefined} diff --git a/packages/toolbox-ui/src/components/proofs/ProofsTable.tsx b/packages/toolbox-ui/src/components/proofs/ProofsTable.tsx index 819f228..6e76fbb 100644 --- a/packages/toolbox-ui/src/components/proofs/ProofsTable.tsx +++ b/packages/toolbox-ui/src/components/proofs/ProofsTable.tsx @@ -1,7 +1,7 @@ import type { ConnectionRecord, ProofExchangeRecord } from '@aries-framework/core' import { ProofsUtil } from '@animo/toolbox-core/src/utils/records/ProofsUtil' -import { Badge, Group, ScrollArea, Table, Text, useMantineTheme } from '@mantine/core' +import { Badge, createStyles, Group, ScrollArea, Table, Text, useMantineTheme } from '@mantine/core' import React from 'react' import { useProofsFormatData } from '../../contexts/ProofsFormatDataProvider' @@ -16,19 +16,40 @@ interface ProofsTableProps { onDecline: (proof: ProofExchangeRecord) => void } +const useStyles = createStyles(() => ({ + table: { + width: '100%', + minWidth: 870, + tableLayout: 'fixed', + }, + labelSize: { + width: 150, + }, + idSize: { + width: 200, + }, + stateSize: { + width: 100, + }, + actionsSize: { + width: 160, + }, +})) + export const ProofsTable = ({ records, connections, onDelete, onAccept, onDecline }: ProofsTableProps) => { + const { classes } = useStyles() const theme = useMantineTheme() const { formattedData } = useProofsFormatData() return ( - +
- - - - + + + @@ -43,8 +64,8 @@ export const ProofsTable = ({ records, connections, onDelete, onAccept, onDeclin return ( - - - - )
ConnectionProof IdState + ConnectionProof IdState
- + + {proofName} @@ -53,23 +74,21 @@ export const ProofsTable = ({ records, connections, onDelete, onAccept, onDeclin + {record.id} + {record.state} - - onAccept(record) : undefined} - onDecline={isWaitingForDecline ? () => onDecline(record) : undefined} - onDelete={() => onDelete(record)} - isLoading={isLoading} - /> - + + onAccept(record) : undefined} + onDecline={isWaitingForDecline ? () => onDecline(record) : undefined} + onDelete={() => onDelete(record)} + isLoading={isLoading} + />