Commit 030b510e authored by tom's avatar tom

support "alertStatus" field in address metadata payload

parent e2081d49
......@@ -30,6 +30,7 @@ export default function parseMetaPayload(meta: AddressMetadataTag['meta']): Addr
'data',
'alertBgColor',
'alertTextColor',
'alertStatus',
];
for (const stringField of stringFields) {
......
import type { AlertStatus } from '@chakra-ui/react';
export interface AddressMetadataInfo {
addresses: Record<string, {
tags: Array<AddressMetadataTag>;
......@@ -35,6 +37,7 @@ export interface AddressMetadataTagApi extends Omit<AddressMetadataTag, 'meta'>
data?: string;
alertBgColor?: string;
alertTextColor?: string;
alertStatus?: AlertStatus;
} | null;
}
......
......@@ -23,7 +23,7 @@ const AddressMetadataAlert = ({ tags }: Props) => {
<Alert
mt="-4px"
mb={ 6 }
status="error"
status={ noteTag.meta?.alertStatus ?? 'error' }
bgColor={ noteTag.meta?.alertBgColor }
color={ noteTag.meta?.alertTextColor }
whiteSpace="pre-wrap"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment