diff --git a/datahub-web-react/src/app/ingest/source/builder/RecipeForm/FormField.tsx b/datahub-web-react/src/app/ingest/source/builder/RecipeForm/FormField.tsx index 47092b078b..d5f7f16598 100644 --- a/datahub-web-react/src/app/ingest/source/builder/RecipeForm/FormField.tsx +++ b/datahub-web-react/src/app/ingest/source/builder/RecipeForm/FormField.tsx @@ -19,6 +19,17 @@ const StyledRemoveIcon = styled(MinusCircleOutlined)` margin-left: 10px; `; +const StyledCheckbox = styled(Checkbox)` + .ant-checkbox-inner { + border-color: ${ANTD_GRAY[7]}; + } + .ant-checkbox-checked { + .ant-checkbox-inner { + border-color: ${(props) => props.theme.styles['primary-color']}; + } + } +`; + interface CommonFieldProps { field: RecipeField; removeMargin?: boolean; @@ -121,7 +132,7 @@ function FormField(props: Props) { const isBoolean = field.type === FieldType.BOOLEAN; let input = ; - if (isBoolean) input = ; + if (isBoolean) input = ; if (field.type === FieldType.TEXTAREA) input = ; const valuePropName = isBoolean ? 'checked' : 'value'; diff --git a/datahub-web-react/src/app/ingest/source/builder/__tests__/DefineRecipeStep.test.tsx b/datahub-web-react/src/app/ingest/source/builder/__tests__/DefineRecipeStep.test.tsx index b48d59fdfd..d900f0ad41 100644 --- a/datahub-web-react/src/app/ingest/source/builder/__tests__/DefineRecipeStep.test.tsx +++ b/datahub-web-react/src/app/ingest/source/builder/__tests__/DefineRecipeStep.test.tsx @@ -1,22 +1,26 @@ import { MockedProvider } from '@apollo/client/testing'; import { render } from '@testing-library/react'; import React from 'react'; +import { ThemeProvider } from 'styled-components'; +import defaultThemeConfig from '../../../../../conf/theme/theme_light.config.json'; import { DefineRecipeStep } from '../DefineRecipeStep'; import { SourceConfig } from '../types'; describe('DefineRecipeStep', () => { it('should render the RecipeBuilder if the type is in CONNECTORS_WITH_FORM', () => { const { getByText, queryByText } = render( - - {}} - goTo={() => {}} - submit={() => {}} - cancel={() => {}} - ingestionSources={[{ name: 'snowflake', displayName: 'Snowflake' } as SourceConfig]} - /> - , + + + {}} + goTo={() => {}} + submit={() => {}} + cancel={() => {}} + ingestionSources={[{ name: 'snowflake', displayName: 'Snowflake' } as SourceConfig]} + /> + + , ); expect(getByText('Connection')).toBeInTheDocument(); @@ -25,16 +29,18 @@ describe('DefineRecipeStep', () => { it('should not render the RecipeBuilder if the type is not in CONNECTORS_WITH_FORM', () => { const { getByText, queryByText } = render( - - {}} - goTo={() => {}} - submit={() => {}} - cancel={() => {}} - ingestionSources={[{ name: 'glue', displayName: 'Glue' } as SourceConfig]} - /> - , + + + {}} + goTo={() => {}} + submit={() => {}} + cancel={() => {}} + ingestionSources={[{ name: 'glue', displayName: 'Glue' } as SourceConfig]} + /> + + , ); expect(getByText('Configure Glue Recipe')).toBeInTheDocument();