0.0.7 • Published 5 months ago

tcomb-checkbox-switch v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

tcomb-checkbox-switch

tcomb-checkbox-switch is an addon package that transforms the standard checkbox in tcomb-form into a switch-style input.

Installation

First, install the package in your project using the following command:

npm install tcomb-checkbox-switch

or if you use yarn:

yarn add tcomb-checkbox-switch

Usage

After adding the package to your project, you can use it as follows:

import t from "tcomb-form";
import CheckboxSwitch from 'tcomb-checkbox-switch'; // <-- import package

const Schema = t.struct({
    is_active: t.Boolean,
});

const Options = {
    is_active: {
      label: "Is Active",
      factory: CheckboxSwitch, // <-- Add factory
    },
};

This code creates a switch-style input for a boolean value named is_active.

Features

If you wish to contribute to the development of this package, please apply to the project on GitHub. If you encounter any issues or have suggestions related to this package, please contact us via the GitHub Issues section.

0.0.7

5 months ago

0.0.6

7 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago