feat: implement bulk action framework, expand data table component, and update enterprise module configuration.
This commit is contained in:
@@ -46,7 +46,7 @@ export const PageActions = memo(function PageActions({ actions = [], customButto
|
||||
const ButtonWithDropdown = (
|
||||
<Button
|
||||
variant={action.variant || 'transparent'}
|
||||
color={getIntentColor(action.intent)}
|
||||
color={action?.color ? action.color : getIntentColor(action.intent)}
|
||||
leftSection={action.icon}
|
||||
rightSection={<ChevronDown size={14} />}
|
||||
disabled={action.disabled}
|
||||
@@ -78,7 +78,7 @@ export const PageActions = memo(function PageActions({ actions = [], customButto
|
||||
<Menu.Item
|
||||
key={child.key}
|
||||
leftSection={child.icon}
|
||||
color={getIntentColor(child.intent)}
|
||||
color={action?.color ? action.color : getIntentColor(child.intent)}
|
||||
disabled={child.disabled}
|
||||
onClick={() => child.onClick?.(child.key || '')}
|
||||
>
|
||||
@@ -95,7 +95,7 @@ export const PageActions = memo(function PageActions({ actions = [], customButto
|
||||
const StandaloneButton = (
|
||||
<Button
|
||||
variant={action.variant || 'transparent'}
|
||||
color={getIntentColor(action.intent)}
|
||||
color={action?.color ? action.color : getIntentColor(action.intent)}
|
||||
leftSection={action.icon}
|
||||
disabled={action.disabled}
|
||||
onClick={() => action.onClick?.(action.key || '')}
|
||||
@@ -142,7 +142,7 @@ export const PageActions = memo(function PageActions({ actions = [], customButto
|
||||
<Menu.Item
|
||||
key={child.key}
|
||||
leftSection={child.icon}
|
||||
color={getIntentColor(child.intent)}
|
||||
color={action?.color ? action.color : getIntentColor(child.intent)}
|
||||
disabled={child.disabled}
|
||||
onClick={() => child.onClick?.(child.key || '')}
|
||||
style={{ paddingLeft: '1.5rem' }}
|
||||
@@ -157,7 +157,7 @@ export const PageActions = memo(function PageActions({ actions = [], customButto
|
||||
);
|
||||
}
|
||||
|
||||
const color = getIntentColor(action.intent);
|
||||
const color = action?.color ? action.color : getIntentColor(action.intent);
|
||||
const realColor = color === undefined ? 'brand' : color;
|
||||
|
||||
return (
|
||||
|
||||
@@ -23,6 +23,8 @@ export interface BaseAction {
|
||||
|
||||
/** Semantic context to determine visual emphasis (color mapping). */
|
||||
intent?: ActionIntent;
|
||||
|
||||
color?: string;
|
||||
/** Callback triggered upon action execution. */
|
||||
onClick?: (key: string) => void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user