-
- Liquidity is running low{' '}
- {liquidityAmount ? `(${liquidityAmount})` : null}
+
+
+ {liquidityAmount
+ ? `${liquidityAmount} withdrawal liquidity`
+ : 'Liquidity is running low'}
-
- There is not enough capital to withdraw
+
Sell a smaller amount
+
+ ),
+ MaxSupplyReachedAlert: ({ supplyCapInUsd }) => (
+
+ Supply caps reached
+
+ Can only buy {supplyCapInUsd} more
),
diff --git a/src/trading-widget/providers/component-provider/component-provider.types.ts b/src/trading-widget/providers/component-provider/component-provider.types.ts
index 3d4eef0c..8f125b2e 100644
--- a/src/trading-widget/providers/component-provider/component-provider.types.ts
+++ b/src/trading-widget/providers/component-provider/component-provider.types.ts
@@ -23,6 +23,10 @@ export interface AvailableLiquidityAlertProps {
liquidityAmount: string
}
+export interface MaxSupplyCapProps {
+ supplyCapInUsd: string
+}
+
export interface ComponentProviderProps {
config?: {
GeoBlockAlert?: ComponentType
@@ -35,5 +39,6 @@ export interface ComponentProviderProps {
DepositTermsOfUse?: ComponentType
ActionButton?: ComponentType>
AvailableLiquidityAlert?: ComponentType
+ MaxSupplyReachedAlert?: ComponentType
}
}
diff --git a/src/trading-widget/providers/theme-provider/theme-provider.tsx b/src/trading-widget/providers/theme-provider/theme-provider.tsx
index 7be19fb9..1404967f 100644
--- a/src/trading-widget/providers/theme-provider/theme-provider.tsx
+++ b/src/trading-widget/providers/theme-provider/theme-provider.tsx
@@ -84,7 +84,7 @@ export const ThemeProvider: FC> = ({
}`,
'--panel-warning-content-color': `${
- config?.global?.color?.colorTextWarning ?? COLORS.AMBER['400']
+ config?.global?.color?.colorTextWarning ?? COLORS.WARNING
}`,
'--panel-success-content-color': `${
@@ -610,6 +610,29 @@ export const ThemeProvider: FC> = ({
config?.component?.tooltip?.color?.colorText ?? COLORS.WHITE.DEFAULT
}`,
+ // alert
+ '--panel-alert-error-bg': `${
+ config?.component?.alert?.color?.errorBg ?? `${COLORS.ERROR}4D`
+ }`,
+ '--panel-alert-warning-bg': `${
+ config?.component?.alert?.color?.warningBg ?? `${COLORS.WARNING}4D`
+ }`,
+ '--panel-alert-info-bg': `${
+ config?.component?.alert?.color?.infoBg ?? `${COLORS.INFO}4D`
+ }`,
+ '--panel-alert-error-color': `${
+ config?.component?.alert?.color?.errorTextColor ??
+ 'var(--panel-error-content-color)'
+ }`,
+ '--panel-alert-warning-color': `${
+ config?.component?.alert?.color?.warningTextColor ??
+ 'var(--panel-warning-content-color)'
+ }`,
+ '--panel-alert-info-color': `${
+ config?.component?.alert?.color?.infoTextColor ??
+ 'var(--panel-content-color)'
+ }`,
+
//switch
//switch-color
'--panel-switch-bg-checked': `${
diff --git a/src/trading-widget/providers/theme-provider/theme-provider.types.ts b/src/trading-widget/providers/theme-provider/theme-provider.types.ts
index 11d43be4..cbed28df 100644
--- a/src/trading-widget/providers/theme-provider/theme-provider.types.ts
+++ b/src/trading-widget/providers/theme-provider/theme-provider.types.ts
@@ -67,6 +67,16 @@ export interface ThemeProviderConfigProps {
radiusMd?: string
}
}
+ alert?: {
+ color?: {
+ errorBg?: string
+ warningBg?: string
+ infoBg?: string
+ errorTextColor?: string
+ warningTextColor?: string
+ infoTextColor?: string
+ }
+ }
notification?: {
color?: {
colorBg?: string