diff --git a/superset-frontend/spec/javascripts/profile/App_spec.tsx b/superset-frontend/spec/javascripts/profile/App_spec.tsx
index 13b53b8b765..e45b1999bea 100644
--- a/superset-frontend/spec/javascripts/profile/App_spec.tsx
+++ b/superset-frontend/spec/javascripts/profile/App_spec.tsx
@@ -17,9 +17,10 @@
* under the License.
*/
import React from 'react';
-import { Col, Row, Tab } from 'react-bootstrap';
+import { Col, Row } from 'react-bootstrap';
import { shallow } from 'enzyme';
import App from 'src/profile/components/App';
+import Tabs from 'src/common/components/Tabs';
import { user } from './fixtures';
@@ -39,6 +40,6 @@ describe('App', () => {
it('renders 4 Tabs', () => {
const wrapper = shallow();
- expect(wrapper.find(Tab)).toHaveLength(4);
+ expect(wrapper.find(Tabs.TabPane)).toHaveLength(4);
});
});
diff --git a/superset-frontend/src/common/components/Dropdown.tsx b/superset-frontend/src/common/components/Dropdown.tsx
index cfef8e09a93..47733faebfc 100644
--- a/superset-frontend/src/common/components/Dropdown.tsx
+++ b/superset-frontend/src/common/components/Dropdown.tsx
@@ -18,18 +18,14 @@
*/
import React from 'react';
import { Dropdown as AntdDropdown } from 'src/common/components';
-import { css } from '@emotion/core';
import { styled } from '@superset-ui/core';
-const dotStyle = css`
- width: 3px;
- height: 3px;
- border-radius: 1.5px;
- background-color: #bababa;
-`;
-
const MenuDots = styled.div`
- ${dotStyle};
+ width: ${({ theme }) => theme.gridUnit * 0.75}px;
+ height: ${({ theme }) => theme.gridUnit * 0.75}px;
+ border-radius: 50%;
+ background-color: ${({ theme }) => theme.colors.grayscale.light1};
+
font-weight: ${({ theme }) => theme.typography.weights.normal};
display: inline-flex;
position: relative;
@@ -47,7 +43,10 @@ const MenuDots = styled.div`
&::after {
position: absolute;
content: ' ';
- ${dotStyle};
+ width: ${({ theme }) => theme.gridUnit * 0.75}px;
+ height: ${({ theme }) => theme.gridUnit * 0.75}px;
+ border-radius: 50%;
+ background-color: ${({ theme }) => theme.colors.grayscale.light1};
}
&::before {
diff --git a/superset-frontend/src/common/components/Modal.tsx b/superset-frontend/src/common/components/Modal.tsx
index 46e65c1fd6e..55f9f47eea5 100644
--- a/superset-frontend/src/common/components/Modal.tsx
+++ b/superset-frontend/src/common/components/Modal.tsx
@@ -57,7 +57,7 @@ const StyledModal = styled(BaseModal)`
.close {
flex: 1 1 auto;
- margin-bottom: 3px;
+ margin-bottom: ${({ theme }) => theme.gridUnit}px;
color: ${({ theme }) => theme.colors.secondary.dark1};
font-size: 32px;
font-weight: ${({ theme }) => theme.typography.weights.light};
@@ -65,12 +65,13 @@ const StyledModal = styled(BaseModal)`
}
.ant-modal-body {
- padding: 18px;
+ padding: ${({ theme }) => theme.gridUnit * 4}px;
}
.ant-modal-footer {
- border-top: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
- padding: 16px;
+ border-top: ${({ theme }) => theme.gridUnit / 4}px solid
+ ${({ theme }) => theme.colors.grayscale.light2};
+ padding: ${({ theme }) => theme.gridUnit * 4}px;
.btn {
font-size: 12px;
@@ -78,9 +79,14 @@ const StyledModal = styled(BaseModal)`
}
.btn + .btn {
- margin-left: 8px;
+ margin-left: ${({ theme }) => theme.gridUnit * 2}px;
}
}
+
+ // styling for Tabs component
+ .ant-tabs {
+ margin-top: -${({ theme }) => theme.gridUnit * 4}px;
+ }
`;
export default function Modal({
diff --git a/superset-frontend/src/common/components/Tabs.tsx b/superset-frontend/src/common/components/Tabs.tsx
index e87f7835ddb..7627354651f 100644
--- a/superset-frontend/src/common/components/Tabs.tsx
+++ b/superset-frontend/src/common/components/Tabs.tsx
@@ -17,10 +17,9 @@
* under the License.
*/
import React from 'react';
-import { styled } from '@superset-ui/core';
+import { css, styled } from '@superset-ui/core';
import { Tabs as AntdTabs } from 'src/common/components';
-import { css } from '@emotion/core';
-import Icon from '../../components/Icon';
+import Icon from 'src/components/Icon';
interface TabsProps {
fullWidth?: boolean;
@@ -52,7 +51,10 @@ const StyledTabs = styled(AntdTabs, {
`};
.ant-tabs-tab-btn {
+ display: flex;
flex: 1 1 auto;
+ align-items: center;
+ justify-content: center;
font-size: ${({ theme }) => theme.typography.sizes.s}px;
text-align: center;
text-transform: uppercase;
diff --git a/superset-frontend/src/profile/components/App.tsx b/superset-frontend/src/profile/components/App.tsx
index 0d18199c112..8642dd78e10 100644
--- a/superset-frontend/src/profile/components/App.tsx
+++ b/superset-frontend/src/profile/components/App.tsx
@@ -17,7 +17,8 @@
* under the License.
*/
import React from 'react';
-import { Col, Row, Tabs, Tab, Panel } from 'react-bootstrap';
+import { Col, Row, Panel } from 'react-bootstrap';
+import Tabs from 'src/common/components/Tabs';
import { t } from '@superset-ui/core';
import Favorites from './Favorites';
@@ -39,10 +40,10 @@ export default function App({ user }: AppProps) {
-
-
+
{t('Favorites')}
@@ -53,10 +54,10 @@ export default function App({ user }: AppProps) {
-
-
+
{t('Created Content')}
@@ -67,10 +68,10 @@ export default function App({ user }: AppProps) {
-
-
+
{t('Recent Activity')}
@@ -81,10 +82,10 @@ export default function App({ user }: AppProps) {
-
-
+
{t('Security & Access')}
@@ -95,7 +96,7 @@ export default function App({ user }: AppProps) {
-
+