mirror of
https://github.com/apache/superset.git
synced 2026-04-20 16:44:46 +00:00
fix(themes): correct action icons size and restore missing tooltips (#37409)
This commit is contained in:
@@ -69,7 +69,8 @@ export function ActionsBar({ actions }: ActionsBarProps) {
|
||||
return (
|
||||
<ActionButton
|
||||
key={tooltip ? undefined : index}
|
||||
icon={<IconComponent />}
|
||||
icon={<IconComponent iconSize="l" />}
|
||||
tooltip={tooltip}
|
||||
{...rest}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -386,14 +386,14 @@ function ThemesList({
|
||||
</Tooltip>
|
||||
)}
|
||||
{original.is_system_default && (
|
||||
<Tooltip title={t('This is the system default theme')}>
|
||||
<Tooltip title={t('This is the default light theme')}>
|
||||
<IconTag color="warning" icon={<Icons.SunOutlined />}>
|
||||
{t('Default')}
|
||||
</IconTag>
|
||||
</Tooltip>
|
||||
)}
|
||||
{original.is_system_dark && (
|
||||
<Tooltip title={t('This is the system dark theme')}>
|
||||
<Tooltip title={t('This is the default dark theme')}>
|
||||
<IconTag color="default" icon={<Icons.MoonOutlined />}>
|
||||
{t('Dark')}
|
||||
</IconTag>
|
||||
@@ -442,9 +442,7 @@ function ThemesList({
|
||||
canApply
|
||||
? {
|
||||
label: 'apply-action',
|
||||
tooltip: t(
|
||||
'Set local theme. Will be applied to your session until unset.',
|
||||
),
|
||||
tooltip: t('Set local theme for testing'),
|
||||
placement: 'bottom',
|
||||
icon: 'ThunderboltOutlined',
|
||||
onClick: handleApply,
|
||||
@@ -453,9 +451,7 @@ function ThemesList({
|
||||
canEdit
|
||||
? {
|
||||
label: 'edit-action',
|
||||
tooltip: original.is_system
|
||||
? t('View theme')
|
||||
: t('Edit theme'),
|
||||
tooltip: original.is_system ? t('View') : t('Edit'),
|
||||
placement: 'bottom',
|
||||
icon: original.is_system ? 'EyeOutlined' : 'EditOutlined',
|
||||
onClick: handleEdit,
|
||||
@@ -464,7 +460,7 @@ function ThemesList({
|
||||
canExport
|
||||
? {
|
||||
label: 'export-action',
|
||||
tooltip: t('Export theme'),
|
||||
tooltip: t('Export'),
|
||||
placement: 'bottom',
|
||||
icon: 'UploadOutlined',
|
||||
onClick: handleExport,
|
||||
@@ -473,7 +469,7 @@ function ThemesList({
|
||||
canSetSystemThemes && !original.is_system_default
|
||||
? {
|
||||
label: 'set-default-action',
|
||||
tooltip: t('Set as system default theme'),
|
||||
tooltip: t('Set as default light theme'),
|
||||
placement: 'bottom',
|
||||
icon: 'SunOutlined',
|
||||
onClick: () => handleSetSystemDefault(original),
|
||||
@@ -482,7 +478,7 @@ function ThemesList({
|
||||
canSetSystemThemes && original.is_system_default
|
||||
? {
|
||||
label: 'unset-default-action',
|
||||
tooltip: t('Remove as system default theme'),
|
||||
tooltip: t('Clear default light theme'),
|
||||
placement: 'bottom',
|
||||
icon: 'StopOutlined',
|
||||
onClick: () => handleUnsetSystemDefault(),
|
||||
@@ -491,7 +487,7 @@ function ThemesList({
|
||||
canSetSystemThemes && !original.is_system_dark
|
||||
? {
|
||||
label: 'set-dark-action',
|
||||
tooltip: t('Set as system dark theme'),
|
||||
tooltip: t('Set as default dark theme'),
|
||||
placement: 'bottom',
|
||||
icon: 'MoonOutlined',
|
||||
onClick: () => handleSetSystemDark(original),
|
||||
@@ -500,7 +496,7 @@ function ThemesList({
|
||||
canSetSystemThemes && original.is_system_dark
|
||||
? {
|
||||
label: 'unset-dark-action',
|
||||
tooltip: t('Remove as system dark theme'),
|
||||
tooltip: t('Clear default dark theme'),
|
||||
placement: 'bottom',
|
||||
icon: 'StopOutlined',
|
||||
onClick: () => handleUnsetSystemDark(),
|
||||
|
||||
Reference in New Issue
Block a user