npm.io
4.0.5 • Published 2 years ago

@types/react-toggle

Licence
MIT
Version
4.0.5
Deps
1
Size
3 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/react-toggle

Summary

This package contains type definitions for react-toggle (https://github.com/aaronshaf/react-toggle).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-toggle.

index.d.ts

import { Component, InputHTMLAttributes, ReactNode } from "react";

export interface ToggleIcons {
    checked?: ReactNode | undefined;
    unchecked?: ReactNode | undefined;
}

export interface ToggleProps extends InputHTMLAttributes<HTMLInputElement> {
    "aria-labelledby"?: string | undefined;
    "aria-label"?: string | undefined;
    icons?: boolean | ToggleIcons | undefined;
}

export default class Toggle extends Component<ToggleProps> {}

Additional Details

  • Last updated: Tue, 07 Nov 2023 2000 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Karol Janyst.