# @types/react-native-countdown-component

> TypeScript definitions for react-native-countdown-component

Latest version **2.7.4** (published 2023-12-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-native-countdown-component
pnpm add @types/react-native-countdown-component
yarn add @types/react-native-countdown-component
bun add @types/react-native-countdown-component
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.7.4 |
| Published | 2023-12-21 |
| First published | 2021-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51433 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-native-countdown-component
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-countdown-component
- npm.io page: https://npm.io/package/@types/react-native-countdown-component

## Dependencies (2)

- [@types/react](https://npm.io/package/@types/react.md) *
- [react-native](https://npm.io/package/react-native.md) *

## Recent versions

- 2.7.4 (latest) — 2023-12-21
- 2.7.3 (ts4.5) — 2023-11-07
- 2.7.0 (ts3.6) — 2021-07-20
- 2.7.2 — 2023-10-18
- 2.7.1 — 2023-09-27

## README

# Installation
> `npm install --save @types/react-native-countdown-component`

# Summary
This package contains type definitions for react-native-countdown-component (https://github.com/talalmajali/react-native-countdown-component).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-countdown-component.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-countdown-component/index.d.ts)
````ts
import { Component } from "react";
import { StyleProp, TextStyle, ViewStyle } from "react-native";

export type DigitType = "D" | "H" | "M" | "S";

export interface CountDownProps {
    /**
     * Counter id, to determine whether to reset the counter or not
     * @default null
     */
    id?: string | null;

    /**
     * Override the component style
     * @default {}
     */
    style?: StyleProp<ViewStyle>;

    /**
     *  Digit style
     * @default {backgroundColor: '#FAB913'}
     */
    digitStyle?: StyleProp<ViewStyle>;

    /**
     * Digit Text style
     * @default {color: #FAB913 '#000'}
     */
    digitTxtStyle?: StyleProp<TextStyle>;

    /**
     * Time Label style
     * @default {color: #FAB913 '#000'}
     */
    timeLabelStyle?: StyleProp<TextStyle>;

    /**
     * Separator style
     * @default {color: #FAB913 '#000'}
     */
    separatorStyle?: StyleProp<TextStyle>;

    /**
     * Size of the countdown component
     * @default 15
     */
    size?: number;

    /**
     * Number of seconds to countdown
     * @default 0
     */
    until?: number;

    /**
     * What function should be invoked when the time is 0
     * @default null
     */
    onFinish?: () => void;

    /**
     * What function should be invoked when the timer is changing
     * @default null
     */
    onChange?: (until: number) => void;

    /**
     * What function should be invoked when clicking on the timer
     * @default null
     */
    onPress?: () => void;

    /**
     * What Digits to show
     * @default ['D', 'H', 'M', 'S']
     */
    timeToShow?: DigitType[];

    /**
     * Text to show in time label
     * @default {d: 'Days', h: 'Hours', m: 'Minutes', s: 'Seconds'}
     */
    timeLabels?: { d?: string; h?: string; m?: string; s?: string };

    /**
     * Should show separator
     * @default false
     */
    showSeparator?: boolean;

    /**
     * A boolean to pause and resume the component
     * @default true
     */
    running?: boolean;
}

export interface CountDownState {
    until: number;
    lastUntil: number | null;
    wentBackgroundAt: number | null;
}

export default class CountDown extends Component<CountDownProps, CountDownState> {}

````

### Additional Details
 * Last updated: Thu, 21 Dec 2023 19:06:51 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react), [react-native](https://npmjs.com/package/react-native)

# Credits
These definitions were written by [Tamir Kfir](https://github.com/ktamir).

---
_Source: https://npm.io/package/@types/react-native-countdown-component · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
