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

View File

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

View File

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

View File

@ -1,5 +1,4 @@
import { Form } from 'antd';
import FormItem from 'antd/lib/form/FormItem';
import styled from 'styled-components';
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;
&:focus {
width: 350px;