# @ray-js/components-ty-alert

> 涂鸦风格警告提示组件

Latest version **0.1.0** (published 2022-11-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ray-js/components-ty-alert
pnpm add @ray-js/components-ty-alert
yarn add @ray-js/components-ty-alert
bun add @ray-js/components-ty-alert
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2022-11-15 |
| First published | 2022-07-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tuyafe |

## Links

- npm: https://www.npmjs.com/package/@ray-js/components-ty-alert
- npm.io page: https://npm.io/package/@ray-js/components-ty-alert

## Dependencies (1)

- [clsx](https://npm.io/package/clsx.md) ^1.1.1

## Recent versions

- 0.1.0 (latest) — 2022-11-15
- 0.0.2-beta-534d0aa1 (beta) — 2022-07-04
- 0.0.2 — 2022-07-04
- 0.0.1 — 2022-07-04
- 0.0.1-beta-e685895f — 2022-07-04

## README

English | [简体中文](./README-zh_CN.md)

# @ray-js/components-ty-alert

[![latest](https://img.shields.io/npm/v/@ray-js/components-ty-alert/latest.svg)](https://www.npmjs.com/package/@ray-js/components-ty-alert) [![download](https://img.shields.io/npm/dt/@ray-js/components-ty-alert.svg)](https://www.npmjs.com/package/@ray-js/components-ty-alert)

> 涂鸦风格警告提示组件

## Installation

```sh
$ npm install @ray-js/components-ty-alert
# or
$ yarn add @ray-js/components-ty-alert
```

## Usage

### Basic Usage

```tsx
import Alert from '@ray-js/components-ty-alert';

export default () => <Alert message="Alert message" />;
```

### Three kinds of style

```tsx
import Alert from '@ray-js/components-ty-alert';

export default () => (
  <>
    <Alert type="info" message="Alert message" />
    <Alert type="warning" message="Alert message" />
    <Alert type="error" message="Alert message" />
  </>
);
```

### Custom Content

```tsx
import Alert from '@ray-js/components-ty-alert';

export default () => (
  <Alert
    type="info"
    message={
      <>
        <Text className={styles.text}>
          如果是家中常住成员，建议您将他设为家庭成员，共享家中所有设备和智能场景。
        </Text>
        <Button type="default" size="mini" onClick={handleClick}>
          家庭设置
        </Button>
      </>
    }
  />
);
```

### Custom Icon

```tsx
import Alert from '@ray-js/components-ty-alert';
import Icon from '@ray-js/components';

export default () => (
  <>
    <Alert
      showIcon
      type="info"
      message="如果是家中常住成员，建议您将他设为家庭成员，共享家中所有设备和智能场景。"
    />
    <Alert
      showIcon
      icon={<Icon type="icon-wifi" size={16} color="#83abff" />}
      type="warning"
      message="如果是家中常住成员，建议您将他设为家庭成员，共享家中所有设备和智能场景。"
    />
  </>
);
```

---
_Source: https://npm.io/package/@ray-js/components-ty-alert · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
