chore(antd): straightening out button import paths (#29969)

This commit is contained in:
Evan Rusackas 2024-08-19 20:15:34 -06:00 committed by GitHub
parent 7e88649730
commit 5ec3093deb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 8 deletions

View File

@ -26,7 +26,7 @@ import {
import { mix } from 'polished'; import { mix } from 'polished';
import cx from 'classnames'; import cx from 'classnames';
import { AntdButton } from 'src/components'; import { Button as AntdButton } from 'antd';
import { useTheme } from '@superset-ui/core'; import { useTheme } from '@superset-ui/core';
import { Tooltip } from 'src/components/Tooltip'; import { Tooltip } from 'src/components/Tooltip';
import { ButtonProps as AntdButtonProps } from 'antd/lib/button'; import { ButtonProps as AntdButtonProps } from 'antd/lib/button';

View File

@ -24,6 +24,7 @@
*/ */
export { default as Select } from './Select/Select'; export { default as Select } from './Select/Select';
export { default as AsyncSelect } from './Select/AsyncSelect'; export { default as AsyncSelect } from './Select/AsyncSelect';
export { default as Button } from './Button';
/* /*
* Components that don't conflict with the ones in src/components. * Components that don't conflict with the ones in src/components.
@ -57,7 +58,6 @@ export {
*/ */
export { export {
Breadcrumb as AntdBreadcrumb, Breadcrumb as AntdBreadcrumb,
Button as AntdButton,
Card as AntdCard, Card as AntdCard,
Checkbox as AntdCheckbox, Checkbox as AntdCheckbox,
Collapse as AntdCollapse, Collapse as AntdCollapse,

View File

@ -35,8 +35,7 @@ import {
LOG_ACTIONS_TOGGLE_EDIT_DASHBOARD, LOG_ACTIONS_TOGGLE_EDIT_DASHBOARD,
} from 'src/logger/LogUtils'; } from 'src/logger/LogUtils';
import Icons from 'src/components/Icons'; import Icons from 'src/components/Icons';
import Button from 'src/components/Button'; import { Button } from 'src/components/';
import { AntdButton } from 'src/components/';
import { findPermission } from 'src/utils/findPermission'; import { findPermission } from 'src/utils/findPermission';
import { Tooltip } from 'src/components/Tooltip'; import { Tooltip } from 'src/components/Tooltip';
import { safeStringify } from 'src/utils/safeStringify'; import { safeStringify } from 'src/utils/safeStringify';
@ -138,7 +137,8 @@ const actionButtonsStyle = theme => css`
} }
`; `;
const StyledUndoRedoButton = styled(AntdButton)` const StyledUndoRedoButton = styled(Button)`
// TODO: check if we need this.
padding: 0; padding: 0;
&:hover { &:hover {
background: transparent; background: transparent;

View File

@ -18,7 +18,7 @@
*/ */
import { useState } from 'react'; import { useState } from 'react';
import { SupersetTheme, t } from '@superset-ui/core'; import { SupersetTheme, t } from '@superset-ui/core';
import { AntdButton, AntdSelect } from 'src/components'; import { Button, AntdSelect } from 'src/components';
import InfoTooltip from 'src/components/InfoTooltip'; import InfoTooltip from 'src/components/InfoTooltip';
import FormLabel from 'src/components/Form/FormLabel'; import FormLabel from 'src/components/Form/FormLabel';
import Icons from 'src/components/Icons'; import Icons from 'src/components/Icons';
@ -142,14 +142,14 @@ export const EncryptedField = ({
</div> </div>
{!fileToUpload && ( {!fileToUpload && (
<AntdButton <Button
className="input-upload-btn" className="input-upload-btn"
onClick={() => onClick={() =>
document?.getElementById('selectedFile')?.click() document?.getElementById('selectedFile')?.click()
} }
> >
{t('Choose File')} {t('Choose File')}
</AntdButton> </Button>
)} )}
{fileToUpload && ( {fileToUpload && (
<div className="input-upload-current"> <div className="input-upload-current">