[CHORE] Get rid of redundant CustomParamButtonType enum
This commit is contained in:
parent
b06ee13268
commit
82330ea3f5
4 changed files with 7 additions and 15 deletions
|
@ -1,8 +1,6 @@
|
|||
import React from 'react';
|
||||
import { TopicMessage } from 'generated-sources';
|
||||
import CustomParamButton, {
|
||||
CustomParamButtonType,
|
||||
} from '../../shared/Form/CustomParams/CustomParamButton';
|
||||
import CustomParamButton from 'components/Topics/shared/Form/CustomParams/CustomParamButton';
|
||||
import MessageItem from './MessageItem';
|
||||
|
||||
interface MessagesTableProp {
|
||||
|
@ -44,7 +42,7 @@ const MessagesTable: React.FC<MessagesTableProp> = ({ messages, onNext }) => {
|
|||
<div className="column is-full">
|
||||
<CustomParamButton
|
||||
className="is-link is-pulled-right"
|
||||
type={CustomParamButtonType.chevronRight}
|
||||
type="fa-chevron-right"
|
||||
onClick={onNext}
|
||||
btnText="Next"
|
||||
/>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import CustomParamButton, { CustomParamButtonType } from './CustomParamButton';
|
||||
import CustomParamButton from './CustomParamButton';
|
||||
|
||||
interface Props {
|
||||
index: string;
|
||||
|
@ -11,7 +11,7 @@ const CustomParamAction: React.FC<Props> = ({ index, onRemove }) => (
|
|||
<label className="label"> </label>
|
||||
<CustomParamButton
|
||||
className="is-danger"
|
||||
type={CustomParamButtonType.minus}
|
||||
type="fa-minus"
|
||||
onClick={() => onRemove(index)}
|
||||
/>
|
||||
</>
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
import React from 'react';
|
||||
|
||||
export enum CustomParamButtonType {
|
||||
plus = 'fa-plus',
|
||||
minus = 'fa-minus',
|
||||
chevronRight = 'fa-chevron-right',
|
||||
}
|
||||
|
||||
interface Props {
|
||||
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
||||
className: string;
|
||||
type: CustomParamButtonType;
|
||||
type: 'fa-plus' | 'fa-minus' | 'fa-chevron-right';
|
||||
btnText?: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
TopicConfigByName,
|
||||
TopicConfigParams,
|
||||
} from 'redux/interfaces';
|
||||
import CustomParamButton, { CustomParamButtonType } from './CustomParamButton';
|
||||
import CustomParamButton from './CustomParamButton';
|
||||
import CustomParamField from './CustomParamField';
|
||||
|
||||
export const INDEX_PREFIX = 'customParams';
|
||||
|
@ -79,7 +79,7 @@ const CustomParams: React.FC<Props> = ({ isSubmitting, config }) => {
|
|||
<div className="column">
|
||||
<CustomParamButton
|
||||
className="is-success"
|
||||
type={CustomParamButtonType.plus}
|
||||
type="fa-plus"
|
||||
onClick={onAdd}
|
||||
btnText="Add Custom Parameter"
|
||||
/>
|
||||
|
|
Loading…
Add table
Reference in a new issue