mirror of https://github.com/apache/superset.git
initial commit (#15551)
This commit is contained in:
parent
29dd0844bf
commit
cd4f97926c
|
@ -19,7 +19,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { css, styled } from '@superset-ui/core';
|
import { css, styled } from '@superset-ui/core';
|
||||||
import AntDTabs, { TabsProps as AntDTabsProps } from 'antd/lib/tabs';
|
import AntDTabs, { TabsProps as AntDTabsProps } from 'antd/lib/tabs';
|
||||||
import Icon from 'src/components/Icon';
|
import Icons from 'src/components/Icons';
|
||||||
|
|
||||||
export interface TabsProps extends AntDTabsProps {
|
export interface TabsProps extends AntDTabsProps {
|
||||||
fullWidth?: boolean;
|
fullWidth?: boolean;
|
||||||
|
@ -119,6 +119,9 @@ const StyledEditableTabs = styled(StyledTabs)`
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const StyledCancelXIcon = styled(Icons.CancelX)`
|
||||||
|
color: ${({ theme }) => theme.colors.grayscale.base};
|
||||||
|
`;
|
||||||
export const EditableTabs = Object.assign(StyledEditableTabs, {
|
export const EditableTabs = Object.assign(StyledEditableTabs, {
|
||||||
TabPane: StyledTabPane,
|
TabPane: StyledTabPane,
|
||||||
});
|
});
|
||||||
|
@ -130,9 +133,7 @@ EditableTabs.defaultProps = {
|
||||||
};
|
};
|
||||||
|
|
||||||
EditableTabs.TabPane.defaultProps = {
|
EditableTabs.TabPane.defaultProps = {
|
||||||
closeIcon: (
|
closeIcon: <StyledCancelXIcon role="button" tabIndex={0} />,
|
||||||
<Icon role="button" tabIndex={0} cursor="pointer" name="cancel-x" />
|
|
||||||
),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const StyledLineEditableTabs = styled(EditableTabs)`
|
export const StyledLineEditableTabs = styled(EditableTabs)`
|
||||||
|
|
Loading…
Reference in New Issue