1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-28 17:55:15 +02:00
unleash.unleash/frontend/src/component/feature/FeatureStrategy/FeatureStrategyForm/FeatureStrategyEnabledDisabled/FeatureStrategyEnabledDisabled.tsx
Tymoteusz Czech 3bb09c5ce4
Disable and enable strategies - frontend (#3582)
Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: andreas-unleash <andreas@getunleash.ai>
2023-04-26 11:41:24 +02:00

25 lines
681 B
TypeScript

import { FormControlLabel, Switch } from '@mui/material';
import { VFC } from 'react';
interface IFeatureStrategyEnabledDisabledProps {
enabled: boolean;
onToggleEnabled: () => void;
}
export const FeatureStrategyEnabledDisabled: VFC<
IFeatureStrategyEnabledDisabledProps
> = ({ enabled, onToggleEnabled }) => {
return (
<FormControlLabel
control={
<Switch
name="enabled"
onChange={onToggleEnabled}
checked={enabled}
/>
}
label="Enabled &ndash; This strategy will be used when evaluating feature toggles."
/>
);
};