# blockspare/3.3.3/admin/components/Switch.js

BlockSpare – Gutenberg Blocks for News, Magazine, Blog &amp; Business Websites, version 3.3.3. 16 lines.

- Page: https://pluginprobe.com/plugins/blockspare/3.3.3/code/admin/components/Switch.js
- Raw: https://pluginprobe.com/plugins/blockspare/3.3.3/raw/admin/components/Switch.js
- Modified: 2024-03-26T14:27:04+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/blockspare/3.3.3/code/admin/components/Switch.js#L10-L20`.

```javascript
import React from 'react'

const Switch = ({data, handleChange}) => {
    return (
        <div className="control-wrapper blocksape-dashboard__switch-control">
            <label className="control-title" for={`blockspare-dashboard-${data.slug}`}>
                <input id={`blockspare-dashboard-${data.slug}`} onChange={(event) => handleChange(event, data.slug)} type="checkbox" checked={data.isEnabled} name={data.name} />
                <span className="switch" ></span>
            </label>
            <span className="control-description"></span>
        </div>
    )
}

export default Switch

```
