[1];
interface DefaultSpreadProps extends HoverBind, FocusBind {
+ cursor: 'pointer' | 'default';
position: 'relative';
zIndex: 1;
- cursor: 'pointer' | 'default';
}
interface StateReturnProps {
@@ -59,9 +58,9 @@ export function usePressable(isPressable?: boolean): UsePressableReturn {
{
...bind,
...focusBind,
+ cursor: isPressable ? 'pointer' : 'default',
position: 'relative',
zIndex: 1,
- cursor: isPressable ? 'pointer' : 'default',
},
{ isHovered, isFocused },
];
diff --git a/src/app/components/json.tsx b/src/app/components/json.tsx
index f53b9b9ac10..ddb68623c14 100644
--- a/src/app/components/json.tsx
+++ b/src/app/components/json.tsx
@@ -1,9 +1,17 @@
import { bytesToHex } from '@stacks/common';
-import { Box } from '@stacks/ui';
import { css } from 'leather-styles/css';
+import { Box } from 'leather-styles/jsx';
import { isBigInt, isTypedArray } from '@shared/utils';
+export function parseJson(content: string) {
+ try {
+ return JSON.stringify(JSON.parse(content), null, 2);
+ } catch (e) {
+ return content;
+ }
+}
+
function parseJsonReadable(value: any) {
if (isBigInt(value)) return value.toString();
if (isTypedArray(value)) return bytesToHex(value);
@@ -20,9 +28,8 @@ export function Json(value: any) {
wordWrap: 'break-word',
},
})}
- fontSize="14px"
- lineHeight="1.7"
- mt="loose"
+ textStyle="caption.01"
+ mt="space.05"
>
{JSON.stringify(value, (_, v) => parseJsonReadable(v), 2)}