semantic-ui-react#CheckboxProps TypeScript Examples

The following examples show how to use semantic-ui-react#CheckboxProps. 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: LobbyRoomList.tsx    From FLECT_Amazon_Chime_Meeting with Apache License 2.0 5 votes vote down vote up
roomSecretCheckRef = React.createRef<React.Component<CheckboxProps, any, any>>()
Example #2
Source File: index.tsx    From frontegg-react with MIT License 5 votes vote down vote up
mapper = (props: SwitchToggleProps): CheckboxProps => ({
  disabled: props.disabled || props.loading,
  toggle: true,
  checked: props.value,
  onChange: (e, data) => (props.readOnly ? undefined : props.onChange?.(!!data.checked)),
})
Example #3
Source File: SettingsTab.tsx    From watchparty with MIT License 5 votes vote down vote up
SettingRow = ({
  icon,
  name,
  description,
  checked,
  disabled,
  onChange,
  content,
  subOnly,
  helpIcon,
}: {
  icon: string;
  name: string;
  description?: React.ReactNode;
  checked?: boolean;
  disabled: boolean;
  updateTS?: number;
  onChange?: (e: React.FormEvent, data: CheckboxProps) => void;
  content?: React.ReactNode;
  subOnly?: boolean;
  helpIcon?: React.ReactNode;
}) => {
  return (
    <React.Fragment>
      <Divider inverted horizontal />
      <div>
        <div style={{ display: 'flex' }}>
          <Icon size="large" name={icon as any} />
          <div>
            {name} {helpIcon}
            {subOnly ? (
              <Label size="mini" color="orange">
                Subscriber only
              </Label>
            ) : null}
          </div>
          {!content && (
            <Radio
              style={{ marginLeft: 'auto' }}
              toggle
              checked={checked}
              disabled={disabled}
              onChange={onChange}
            />
          )}
        </div>
        <div className="smallText" style={{ marginBottom: '8px' }}>
          {description}
        </div>
        {content}
      </div>
    </React.Fragment>
  );
}