@opexa/portal-components 0.0.455 → 0.0.456
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -48,5 +48,7 @@ export interface AccountProps {
|
|
|
48
48
|
accountSettingsEnabled?: boolean;
|
|
49
49
|
/** @default true */
|
|
50
50
|
notificationsEnabled?: boolean;
|
|
51
|
+
/** @default true */
|
|
52
|
+
shouldShowAccountStatus?: boolean;
|
|
51
53
|
}
|
|
52
54
|
export declare function Account(props: AccountProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -45,6 +45,7 @@ const defaultAccountProps = {
|
|
|
45
45
|
accountSettingsUrl: '/account',
|
|
46
46
|
accountSettingsEnabled: true,
|
|
47
47
|
notificationsEnabled: true,
|
|
48
|
+
shouldShowAccountStatus: true,
|
|
48
49
|
};
|
|
49
50
|
const recipe = accountRecipe();
|
|
50
51
|
export function Account(props) {
|
|
@@ -80,6 +81,7 @@ export function Account(props) {
|
|
|
80
81
|
}
|
|
81
82
|
function Profile() {
|
|
82
83
|
const accountQuery = useAccountQuery();
|
|
84
|
+
const accountProps = useAccountPropsContext();
|
|
83
85
|
const account = accountQuery.data;
|
|
84
86
|
const getVerificationColorScheme = (status) => {
|
|
85
87
|
switch (status) {
|
|
@@ -91,7 +93,7 @@ function Profile() {
|
|
|
91
93
|
return 'danger';
|
|
92
94
|
}
|
|
93
95
|
};
|
|
94
|
-
return (_jsxs("div", { className: "flex shrink-0 items-center gap-lg", children: [_jsx(Image, { src: avatarPlaceholder, alt: "", width: 48, height: 48, className: "size-12" }), _jsxs("div", { className: "grow", children: [_jsx("p", { className: "font-semibold text-text-secondary-700 leading-tight", children: account?.name }), _jsxs("div", { className: "flex", children: [_jsxs("p", { className: "grow items-center text-text-tertiary-600 leading-tight", children: ["ID: ", account?.id] }), _jsxs(Badge.Root, { colorScheme: getVerificationColorScheme(account?.verificationStatus), className: "self-start", children: [_jsx(Badge.Indicator, {}), _jsx(Badge.Label, { children: capitalize(account?.verificationStatus || '') })] })] })] })] }));
|
|
96
|
+
return (_jsxs("div", { className: "flex shrink-0 items-center gap-lg", children: [_jsx(Image, { src: avatarPlaceholder, alt: "", width: 48, height: 48, className: "size-12" }), _jsxs("div", { className: "grow", children: [_jsx("p", { className: "font-semibold text-text-secondary-700 leading-tight", children: account?.name }), _jsxs("div", { className: "flex", children: [_jsxs("p", { className: "grow items-center text-text-tertiary-600 leading-tight", children: ["ID: ", account?.id] }), accountProps.shouldShowAccountStatus && (_jsxs(Badge.Root, { colorScheme: getVerificationColorScheme(account?.verificationStatus), className: "self-start", children: [_jsx(Badge.Indicator, {}), _jsx(Badge.Label, { children: capitalize(account?.verificationStatus || '') })] }))] })] })] }));
|
|
95
97
|
}
|
|
96
98
|
function Wallet({ classNames }) {
|
|
97
99
|
const localeInfo = useLocaleInfo();
|