react-bootstrap#Checkbox JavaScript Examples

The following examples show how to use react-bootstrap#Checkbox. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PromotionsListRowComponent.js    From aws-workshop-colony with Apache License 2.0 6 votes vote down vote up
PromotionsListRowComponent = ({promotion}) => {
    const activeCheckboxStyle = {

    };
    let stateCheckboxLabel = promotion.isActive ? 'Active' : 'Inactive';
    return (
        <tr>
            <td><Link to={'/promotion/' + promotion._id}>{promotion._id}</Link></td>
            <td>{promotion.promoName}</td>
            <td><a href={promotion.productUrl} target="_blank" rel="noopener noreferrer">{promotion.productName}</a></td>
            <td>
                <Checkbox checked={promotion.isActive} disabled inline style={activeCheckboxStyle}>
                    {stateCheckboxLabel}
                </Checkbox>
            </td>
            <td>{promotion.allocatedCodes}/{promotion.numberOfCodes}</td>
            <td></td>
        </tr>
    );
}
Example #2
Source File: User.jsx    From mapstore2-cadastrapp with GNU General Public License v3.0 5 votes vote down vote up
export default function User({values, setValue = () => {}}) {
    return (
        <>
            <div className="item-row">
                <div className="label-col">
                    <ControlLabel><Message msgId={'cadastrapp.proprietaire.city'}/></ControlLabel>
                </div>
                <div className="form-col">
                    <MunicipalityCombo value={values?.commune} onSelect={v => setValue('commune', v)} />
                    <div className="text-muted"><Message msgId={'cadastrapp.proprietaire.cityExample'}/></div>
                </div>
            </div>
            <div className="item-row">
                <div className="label-col">
                    <ControlLabel><Message msgId={'cadastrapp.proprietaire.name.title'}/></ControlLabel>
                </div>
                <div className="form-col">
                    <ProprietaireCombo
                        birthsearch={values?.birthsearch ?? false}
                        value={values?.proprietaire}
                        disabled={!values?.commune}
                        cgocommune={values?.commune?.cgocommune}
                        onSelect={v => setValue('proprietaire', v)}
                        onChange={v => setValue('proprietaire', v)}
                    />
                    <div className="text-muted"><Message msgId={'cadastrapp.proprietaire.name.example'}/></div>
                </div>
            </div>
            <div className="item-row">
                <div className="label-col">
                    <ControlLabel/>
                </div>
                <div className="form-col">
                    <Checkbox
                        value={values?.birthsearch}
                        onChange={v => {
                            setValue('birthsearch', v.target.checked);
                        }} >
                        <Message msgId={'cadastrapp.proprietaire.search.birth'}/>
                    </Checkbox>
                    <div className="text-muted"><Message msgId={'cadastrapp.proprietaire.name.tooltip'}/></div>
                </div>
            </div>
        </>);
}