Skip to content

非公式 / UnofficialCloudflare, Inc. 非提携。アカウント情報は入力しないでください。Not affiliated with Cloudflare, Inc. Do not enter Cloudflare credentials here.Official docsこのサイトについてプライバシー

RtkNotification

最終更新 Markdown で表示Agent セットアップ

スライドイン / スライドアウトのアニメーション、アバター、メッセージテキスト、閉じるボタンを備えた、1 件分の通知トーストです。

プロパティ

プロパティ 型 必須 デフォルト 説明
notification Notification ✅ - id、message、image、duration、button を含む Notification オブジェクト
onRtkNotificationDismiss any ❌ - 通知が閉じられたときのコールバック
iconPack IconPack ❌ defaultIconPack カスタムアイコンパック
size 'lg' | 'md' | 'sm' | 'xl' ❌ 'sm' サイズのバリアント
t RtkI18n ❌ - i18n 翻訳関数

使用例

基本的な使い方

import { RtkNotification } from "@cloudflare/realtimekit-react-native-ui";

function MyComponent() {
	return <RtkNotification notification={notification} />;
}

プロパティを指定する場合

import { RtkNotification } from "@cloudflare/realtimekit-react-native-ui";

function MyComponent() {
	return (
		<RtkNotification
			notification={notification}
			onRtkNotificationDismiss={(id) => handleDismiss(id)}
			size="md"
		/>
	);
}

役に立ちましたか?