diff --git a/packages/unleash-frontend-next/src/component/feature/AddFeatureToggleUI.jsx b/packages/unleash-frontend-next/src/component/feature/AddFeatureToggleUI.jsx index 88239b25c2..1aff600bd3 100644 --- a/packages/unleash-frontend-next/src/component/feature/AddFeatureToggleUI.jsx +++ b/packages/unleash-frontend-next/src/component/feature/AddFeatureToggleUI.jsx @@ -3,72 +3,81 @@ import { Input, Switch, Button } from 'react-toolbox'; import AddFeatureToggleStrategy from './AddFeatureToggleStrategy'; import ConfiguredStrategies from './ConfiguredStrategies'; -class AddFeatureToggleUI extends React.Component { - static propTypes () { - return { - strategies: PropTypes.array.required, - featureToggle: PropTypes.object, - updateField: PropTypes.func.required, - addStrategy: PropTypes.func.required, - removeStrategy: PropTypes.func.required, - onSubmit: PropTypes.func.required, - onCancel: PropTypes.func.required, - editmode: PropTypes.bool, - }; - } +const AddFeatureToggleUI = ({ + strategies, + featureToggle, + updateField, + addStrategy, + removeStrategy, + onSubmit, + onCancel, + editmode, +}) => { + const { + name, // eslint-disable-line + description, + enabled, + } = featureToggle; + const configuredStrategies = featureToggle.strategies; - render () { - const configuredStrategies = this.props.featureToggle.strategies; - - return ( -
-
- - - -
- - - -
-
- -
- Activation strategies - -
- -
- -
+ return ( + +
+ +
+ -
+ +
+ Activation strategies + +
+ +
+ +
+ +
+ + +