{"id":21508085,"url":"https://github.com/wtnm/checkboxes-component","last_synced_at":"2025-03-17T14:46:03.283Z","repository":{"id":57197583,"uuid":"356967685","full_name":"wtnm/checkboxes-component","owner":"wtnm","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-01T13:24:47.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-30T06:57:02.299Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wtnm.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-11T20:04:01.000Z","updated_at":"2021-08-01T13:24:49.000Z","dependencies_parsed_at":"2022-09-16T13:11:47.085Z","dependency_job_id":null,"html_url":"https://github.com/wtnm/checkboxes-component","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtnm%2Fcheckboxes-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtnm%2Fcheckboxes-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtnm%2Fcheckboxes-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtnm%2Fcheckboxes-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wtnm","download_url":"https://codeload.github.com/wtnm/checkboxes-component/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244054421,"owners_count":20390549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T20:45:43.460Z","updated_at":"2025-03-17T14:46:03.225Z","avatar_url":"https://github.com/wtnm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\u003c!-- toc --\u003e\n\n\n\n\u003c!-- tocstop --\u003e\n\n## Overview\n`react-checkboxes` - component that renders several checkboxes (or radio) as single input.\n\n## Installation\n\nTo install the stable version:\n\n```\nnpm install --save react-checkboxes\n```\n\n## Usage\n```\nimport {Checkboxes} from 'react-merge'\n```\n\n## Documentation\n\n####Checkboxes(props: CheckboxesProps)\n`CheckboxesProps` - object with following properties:\n  - `_$useTag: string | FunctionComponent` - tag than will be used for chexboxes, default is `Checkbox`.\n  - `$enum: Array\u003cstring | number\u003e` - array of possible values.\n  - `$staticProps: anyObject` - props that passed to every inner checkbox. `onChange` or `onClick` should be passed here.\n  - `$enumExten: anyObject` - extension of `$enum`, props that passed to inner checkbox individually.\n  - `name: string` - name for inner checkboxes.\n  - `type: string` - type of checkboxes (`radio` or `chexbox` for input)\n  - `value: any` - value\n\n  - `[key: string]: any` - rest props will be passed to the root element unchanged.\n\n####Checkbox(props: CheckboxProps)\n`CheckboxesProps` - object with following properties:\n- `name: string` - name\n- `type: string` - type of checkbox (`radio` or `chexbox` for input)\n- `label: string` - label\n- `value: any` - value\n- `$extend` - Component `Checkbox` consists of 3 inner elements: `checkbox`, `input`, `label`. \n  Elements `input` and `label` are inner elements of `checkbox` element. Each element can be extended with custom props passed in `$extend[elementName]`. \n  For example, to add to `label` prop `onClick` should be like: `$extend = {label: {onClick:()=\u003ealert('label')}}`\n\n- `[key: string]: any` - rest props will be passed to the input element unchanged.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtnm%2Fcheckboxes-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwtnm%2Fcheckboxes-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtnm%2Fcheckboxes-component/lists"}