fix: removed direct ref to form item (#2221)

Co-authored-by: mindhash <mindhash@mindhashs-MacBook-Pro.local>
This commit is contained in:
Amol Umbark 2023-02-10 12:29:41 +05:30 committed by GitHub
parent ae37a608f8
commit be14f1c32c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 6 deletions

View File

@ -1,5 +1,4 @@
import { Select, Typography } from 'antd'; import { Form, Select, Typography } from 'antd';
import FormItem from 'antd/lib/form/FormItem';
import React from 'react'; import React from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { import {
@ -18,6 +17,7 @@ import {
} from './styles'; } from './styles';
const { Option } = Select; const { Option } = Select;
const FormItem = Form.Item;
function RuleOptions({ function RuleOptions({
alertDef, alertDef,

View File

@ -95,6 +95,8 @@ export const ThresholdInput = styled(InputNumber)`
align-items: center; align-items: center;
& > .ant-input-number-group-addon { & > .ant-input-number-group-addon {
width: 130px; width: 130px;
border: 0;
background: transparent;
} }
& > .ant-input-number { & > .ant-input-number {
width: 50%; width: 50%;

View File

@ -1,5 +1,4 @@
import { Button, Input, notification } from 'antd'; import { Button, Form, Input, notification } from 'antd';
import FormItem from 'antd/lib/form/FormItem';
import getFeaturesFlags from 'api/features/getFeatureFlags'; import getFeaturesFlags from 'api/features/getFeatureFlags';
import apply from 'api/licenses/apply'; import apply from 'api/licenses/apply';
import React, { useState } from 'react'; import React, { useState } from 'react';
@ -13,6 +12,8 @@ import { PayloadProps } from 'types/api/licenses/getAll';
import { ApplyForm, ApplyFormContainer, LicenseInput } from './styles'; import { ApplyForm, ApplyFormContainer, LicenseInput } from './styles';
const FormItem = Form.Item;
function ApplyLicenseForm({ function ApplyLicenseForm({
licenseRefetch, licenseRefetch,
}: ApplyLicenseFormProps): JSX.Element { }: ApplyLicenseFormProps): JSX.Element {

View File

@ -1,5 +1,4 @@
import { Form } from 'antd'; import { Form } from 'antd';
import FormItem from 'antd/lib/form/FormItem';
import styled from 'styled-components'; import styled from 'styled-components';
export const ApplyFormContainer = styled.div` export const ApplyFormContainer = styled.div`
@ -15,7 +14,7 @@ export const ApplyForm = styled(Form)`
} }
`; `;
export const LicenseInput = styled(FormItem)` export const LicenseInput = styled(Form.Item)`
width: 200px; width: 200px;
&:focus { &:focus {
width: 350px; width: 350px;