-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(devwallet): wide style layout (#2640)
- Loading branch information
1 parent
36e9c53
commit ebebe4d
Showing
33 changed files
with
425 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/apps/dev-wallet/src/Components/Table/FormatCreationDateWrapper.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { IPactCommand } from '@kadena/client'; | ||
import { ICompactTableFormatterProps } from '@kadena/kode-ui/patterns'; | ||
import type { FC } from 'react'; | ||
|
||
type IProps = Exclude<ICompactTableFormatterProps, 'value'> & { | ||
value: string; | ||
}; | ||
|
||
export const FormatCreationDateWrapper: () => FC<IProps> = | ||
() => | ||
({ value }) => { | ||
const date = new Date( | ||
((JSON.parse(value) as IPactCommand).meta.creationTime || 0) * 1000, | ||
).toLocaleString(); | ||
|
||
return date; | ||
}; |
12 changes: 12 additions & 0 deletions
12
packages/apps/dev-wallet/src/Components/Table/FormatHash.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { shorten } from '@/utils/helpers'; | ||
import { ICompactTableFormatterProps } from '@kadena/kode-ui/patterns'; | ||
import type { FC } from 'react'; | ||
|
||
type IProps = Exclude<ICompactTableFormatterProps, 'value'> & { | ||
value: string; | ||
}; | ||
|
||
export const FormatHash: () => FC<IProps> = | ||
() => | ||
({ value }) => | ||
shorten(value); |
26 changes: 26 additions & 0 deletions
26
packages/apps/dev-wallet/src/Components/Table/FormatKeys.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { shorten } from '@/utils/helpers'; | ||
import { MonoKey } from '@kadena/kode-icons/system'; | ||
import { Stack, Text } from '@kadena/kode-ui'; | ||
import { ICompactTableFormatterProps } from '@kadena/kode-ui/patterns'; | ||
|
||
export const FormatKeys = | ||
() => | ||
({ value }: ICompactTableFormatterProps) => { | ||
if (typeof value === 'string') return null; | ||
const keyset: string[] = | ||
value.length > 1 ? (value[1] as unknown as string[]) : []; | ||
|
||
return ( | ||
<Stack gap={'sm'} alignItems={'center'}> | ||
{value[0]}: | ||
{keyset.map((key) => ( | ||
<Stack gap={'sm'} alignItems={'center'}> | ||
<Text variant="code"> | ||
<MonoKey /> | ||
</Text> | ||
<Text variant="code">{shorten(key)}</Text>{' '} | ||
</Stack> | ||
))} | ||
</Stack> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.