diff --git a/superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx index 45b7468b10d..bc6ab49ddf1 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/index.tsx @@ -202,7 +202,7 @@ export function AsyncAceEditor( /* Basic editor styles with dark mode support */ .ace_editor.ace-github, - .ace_editor.ace-textmate { + .ace_editor.ace-tm { background-color: ${token.colorBgContainer} !important; color: ${token.colorText} !important; } diff --git a/superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx index 93a630129ae..3fdd58166bf 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Button/index.tsx @@ -70,7 +70,6 @@ export function Button(props: ButtonProps) { if (!buttonStyle || buttonStyle === 'primary') { variant = 'solid'; antdType = 'primary'; - color = 'primary'; } else if (buttonStyle === 'secondary') { variant = 'filled'; color = 'primary'; @@ -78,7 +77,6 @@ export function Button(props: ButtonProps) { variant = 'outlined'; color = 'default'; } else if (buttonStyle === 'dashed') { - color = 'primary'; variant = 'dashed'; antdType = 'dashed'; } else if (buttonStyle === 'danger') { @@ -134,6 +132,11 @@ export function Button(props: ButtonProps) { '& > span > :first-of-type': { marginRight: firstChildMargin, }, + ':not(:hover)': effectiveButtonStyle === 'secondary' && { + // NOTE: This is the best we can do contrast wise for the secondary button using antd tokens + // and abusing the semantics. Should be revisited when possible. https://github.com/apache/superset/pull/34253#issuecomment-3104834692 + color: `${theme.colorPrimaryTextHover} !important`, + }, }} icon={icon} {...restProps} diff --git a/superset-frontend/packages/superset-ui-core/src/components/DeleteModal/index.tsx b/superset-frontend/packages/superset-ui-core/src/components/DeleteModal/index.tsx index 66ff8289a3d..0eb482b0d83 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/DeleteModal/index.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/DeleteModal/index.tsx @@ -31,11 +31,6 @@ const StyledDiv = styled.div` } `; -const DescriptionContainer = styled.div` - line-height: ${({ theme }) => theme.sizeUnit * 4}px; - padding-top: 16px; -`; - export function DeleteModal({ description, onConfirm, @@ -81,12 +76,12 @@ export function DeleteModal({ onHide={hide} onHandledPrimaryAction={confirm} primaryButtonName={t('Delete')} - primaryButtonType="danger" + primaryButtonStyle="danger" show={open} title={title} centered > - {description} + {description} {t('Type "%s" to confirm', t('DELETE'))} diff --git a/superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.stories.tsx b/superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.stories.tsx index 5edc2b782fb..3b32618b495 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.stories.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.stories.tsx @@ -33,7 +33,7 @@ export const InteractiveModal = (props: ModalProps) => ( InteractiveModal.args = { disablePrimaryButton: false, primaryButtonName: 'Danger', - primaryButtonType: 'danger', + primaryButtonStyle: 'danger', show: true, title: "I'm a modal!", resizable: false, diff --git a/superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.tsx b/superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.tsx index 4b7125dea5d..0d56e61ddcc 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.tsx +++ b/superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.tsx @@ -77,7 +77,7 @@ export const StyledModal = styled(BaseModal)` .ant-modal-header { flex: 0 0 auto; border-radius: ${theme.borderRadius}px ${theme.borderRadius}px 0 0; - padding: ${theme.sizeUnit * 4}px ${theme.sizeUnit * 6}px; + padding: ${theme.sizeUnit * 4}px ${theme.sizeUnit * 4}px; .ant-modal-title { font-weight: ${theme.fontWeightStrong}; @@ -122,6 +122,7 @@ export const StyledModal = styled(BaseModal)` .ant-modal-body { flex: 0 1 auto; padding: ${theme.sizeUnit * 4}px; + padding-bottom: ${theme.sizeUnit * 2}px; overflow: auto; ${!resizable && height && `height: ${height};`} } @@ -208,7 +209,7 @@ const CustomModal = ({ onHide, onHandledPrimaryAction, primaryButtonName = t('OK'), - primaryButtonType = 'primary', + primaryButtonStyle = 'primary', show, name, title, @@ -261,7 +262,7 @@ const CustomModal = ({ ,