Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theme provider to styled-component

Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ export const EditorContainer = styled.div<{ $readOnly?: boolean; $hideBorder?: b
line-height: 1.5;
white-space: pre-wrap;
margin: 0;
color: ${colors.gray[600]};
color: ${(props) => props.theme.styles['text-color']};

a {
font-weight: 500;
color: ${colors.primary[500]};
color: ${(props) => props.theme.styles['primary-color']};
}

li {
Expand Down
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accessibility

Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export function Pill({
onClick={onPillClick}
style={{
backgroundColor: customStyle?.backgroundColor,
fontWeight: "bold",
}}
title={showLabel ? label : undefined}
className={className}
Expand Down
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theme provider to styled-component

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const StyledTabsPrimary = styled(AntTabs)<{
.ant-tabs-tab {
padding: 8px 0;
font-size: 14px;
color: ${colors.gray[600]};
color: ${(props) => props.theme.styles['primary-color']};
}

${({ $addPaddingLeft }) =>
Expand Down Expand Up @@ -116,7 +116,7 @@ const StyledTabsSecondary = styled(AntTabs)<{
padding: 8px 8px;
border-radius: 4px;
font-size: 14px;
color: ${colors.gray[600]};
color: ${(props) => props.theme.styles['primary-color']};
}

${({ $addPaddingLeft }) =>
Expand Down
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theme provider to styled-component

Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ export const INPUT_MAX_HEIGHT = '40px';
export const formLabelTextStyles = {
fontWeight: typography.fontWeights.normal,
fontSize: typography.fontSizes.md,
color: colors.gray[600],
color: `${(props) => props.theme.styles['primary-color']}`,
};

export const inputValueTextStyles = (size = 'md') => ({
fontFamily: typography.fonts.body,
fontWeight: typography.fontWeights.normal,
fontSize: typography.fontSizes[size],
color: colors.gray[700],
color: `${(props) => props.theme.styles['primary-color-dark']}`,
});

export const inputPlaceholderTextStyles = {
fontFamily: typography.fonts.body,
fontWeight: typography.fontWeights.normal,
fontSize: typography.fontSizes.md,
color: colors.gray[400],
color: `${(props) => props.theme.styles['primary-color-light']}`,
};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use shared styled-component over out-of-the-box antd component

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useEntityContext, useEntityData } from '@app/entity/shared/EntityContex
import CreateDataProductModal from '@app/entityV2/domain/DataProductsTab/CreateDataProductModal';
import DataProductResult from '@app/entityV2/domain/DataProductsTab/DataProductResult';
import TabToolbar from '@app/entityV2/shared/components/styled/TabToolbar';
import StyledButton from '@app/entityV2/shared/components/styled/StyledButton';
import { ANTD_GRAY, REDESIGN_COLORS } from '@app/entityV2/shared/constants';
import { SearchBar } from '@app/search/SearchBar';
import { DOMAINS_FILTER_NAME } from '@app/search/utils/constants';
Expand Down Expand Up @@ -107,13 +108,13 @@ export default function DataProductsTab() {
return (
<>
<TabToolbar>
<Button
<StyledButton
type="text"
onClick={() => setIsCreateModalVisible(true)}
data-testid="create-data-product-button"
>
<PlusOutlined /> New Data Product
</Button>
</StyledButton>
<SearchBar
initialQuery={query || ''}
placeholderText="Search data products..."
Expand Down
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theme provider to styled-component

Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ export default styled(Button)`
line-height: 20px;
vertical-align: top;
border-radius: 5px;
color: ${(props) => props.theme.styles['primary-color']};

:hover {
color: ${(props) => props.theme.styles['primary-color-darker']};
background-color: transparent;
}
`;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

styling consistency

Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ const DocumentationContainer = styled.div`
`;

const StyledTabToolbar = styled(TabToolbar)`
background-color: ${REDESIGN_COLORS.LIGHT_GREY};
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
border-left: 2px solid #5c3fd1;
padding: 8px 20px;
margin: 2px 14px 2px 12px;

Expand Down
2 changes: 2 additions & 0 deletions datahub-web-react/src/conf/theme/themeV1.ts
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expand theme styles

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const themeV1: Theme = {
styles: {
'primary-color': '#1890ff',
'primary-color-light': '#F0F5FF',
'primary-color-lighter': '#F0F5FF',
'primary-color-dark': '#002766',
'primary-color-darker': '#002766',
'layout-header-background': 'white',
'layout-header-color': '#434343',
'layout-body-background': 'white',
Expand Down
3 changes: 3 additions & 0 deletions datahub-web-react/src/conf/theme/themeV2.ts
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expand theme styles

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ const themeV2: Theme = {
styles: {
'primary-color': '#533FD1',
'primary-color-dark': '#5C3FD1',
'primary-color-darker': '#5C3FD1',
'primary-color-light': '#ece9f8',
'primary-color-lighter': '#ece9f8',
'layout-header-background': 'white',
'layout-header-color': '#434343',
'body-background': 'white',
'border-color-base': '#ececec',
Expand Down
2 changes: 2 additions & 0 deletions datahub-web-react/src/conf/theme/types.ts
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expand theme styles

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export type Theme = {
styles: {
'primary-color': string;
'primary-color-light': string;
'primary-color-lighter': string;
'primary-color-dark': string;
'primary-color-darker': string;
'layout-header-color': string;
'body-background': string;
'border-color-base': string;
Expand Down
Loading