+ {fields.map((field, idx) => (
+
{field.label}
diff --git a/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/FormatActions.tsx b/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/FormatActions.tsx
new file mode 100644
index 0000000000..2f64cae463
--- /dev/null
+++ b/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/FormatActions.tsx
@@ -0,0 +1,17 @@
+import type { ReactElement } from 'react';
+import React from 'react';
+import type { ICompactTableFormatterProps } from './types';
+
+export interface IActionProps {
+ trigger: ReactElement;
+}
+
+export const FormatActions = ({ trigger }: IActionProps) => {
+ const Component = ({ value }: ICompactTableFormatterProps) => {
+ return React.cloneElement(trigger, {
+ ...trigger.props,
+ onPress: () => trigger.props.onPress(value),
+ });
+ };
+ return Component;
+};
diff --git a/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/FormatStatus.tsx b/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/FormatStatus.tsx
index 15e9664fec..131fbf8b2c 100644
--- a/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/FormatStatus.tsx
+++ b/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/FormatStatus.tsx
@@ -1,10 +1,20 @@
-import { MonoCheck, MonoClear } from '@kadena/kode-icons/system';
+import { MonoCheck, MonoClear, MonoLoading } from '@kadena/kode-icons/system';
import React from 'react';
+import { Stack } from './../../../components';
+import { loaderClass } from './styles.css';
import type { ICompactTableFormatterProps } from './types';
import { valueToString } from './utils';
export const FormatStatus = () => {
- const Component = ({ value }: ICompactTableFormatterProps) =>
- valueToString(value) ?
:
;
+ const Component = ({ value }: ICompactTableFormatterProps) => {
+ if (valueToString(value) === undefined) {
+ return (
+
+
+
+ );
+ }
+ return valueToString(value) ?
:
;
+ };
return Component;
};
diff --git a/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/index.tsx b/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/index.tsx
index b2b62e8cf6..e2f547c4f4 100644
--- a/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/index.tsx
+++ b/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/index.tsx
@@ -1,4 +1,5 @@
import { FormatAccount } from './FormatAccount';
+import { FormatActions } from './FormatActions';
import { FormatAmount } from './FormatAmount';
import { FormatDefault } from './FormatDefault';
import { FormatJsonParse } from './FormatJsonParse';
@@ -13,6 +14,7 @@ import type {
export const CompactTableFormatters = {
FormatAccount,
+ FormatActions,
FormatAmount,
FormatDefault,
FormatLink,
diff --git a/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/styles.css.ts b/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/styles.css.ts
new file mode 100644
index 0000000000..6634ae2d67
--- /dev/null
+++ b/packages/libs/kode-ui/src/patterns/CompactTable/TableFormatters/styles.css.ts
@@ -0,0 +1,13 @@
+import { keyframes } from '@vanilla-extract/css';
+import { style } from './../../../styles';
+
+const rotate = keyframes({
+ '0%': { transform: 'rotate(0deg)' },
+ '100%': { transform: 'rotate(360deg)' },
+});
+
+export const loaderClass = style([
+ {
+ animation: `${rotate} 2s infinite linear `,
+ },
+]);