Added new ToggleSwitch component

This commit is contained in:
Alejandro Celaya
2020-07-14 16:05:00 +02:00
parent 2d96c21b50
commit a675d60d59
4 changed files with 35 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
import React from 'react';
import { Card, CardBody, CardHeader } from 'reactstrap';
import PropTypes from 'prop-types';
import Checkbox from '../utils/Checkbox';
import ToggleSwitch from '../utils/ToggleSwitch';
import { SettingsType } from './reducers/settings';
const propTypes = {
@@ -13,9 +13,9 @@ const RealTimeUpdates = ({ settings: { realTimeUpdates }, setRealTimeUpdates })
<Card>
<CardHeader>Real-time updates</CardHeader>
<CardBody>
<Checkbox checked={realTimeUpdates.enabled} onChange={setRealTimeUpdates}>
<ToggleSwitch checked={realTimeUpdates.enabled} onChange={setRealTimeUpdates}>
Enable or disable real-time updates, when using Shlink v2.2.0 or newer.
</Checkbox>
</ToggleSwitch>
</CardBody>
</Card>
);