Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
@baronha/ting
Advanced tools
Readme
🍞 Flexible and customizable React toast notifications with support for positioning, custom rendering, click handlers, and duration control.
Modal | ||
---|---|---|
yarn add @baronha/ting
or
npm i @baronha/ting
If you want to use Expo. Burnt is the solution for you.
cd ios && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --verbose
cd ios && pod install --verbose
import { toast } from '@baronha/ting';
// ...
const options = {
title: 'Done 😎',
message: 'Successful!!',
};
toast(options); // easy to use
import { toast } from '@baronha/ting';
// ...
const options = {
// ...
title: "Vietnamese Gangz 😎",
message: "Anh em tao là Vietnamese Gangz",
titleColor: '#D60A2E',
icon: {
uri: require('./vietnam.png'), // or remote
size: 24,
},
};
toast(options); // icon is 🇻🇳
import { alert } from '@baronha/ting';
// ...
const options = {
title: 'Done 😎',
message: 'Successful!!',
};
alert(options); // easy to use
Property | Type | Default value | Platform | Toast | Alert | Description |
---|---|---|---|---|---|---|
title | string | null | ✅ | ✅ | ||
message | string | null | ✅ | ✅ | ||
titleColor | string | null | ✅ | ✅ | ||
messageColor | string | null | ✅ | ✅ | ||
icon | object | null | ✅ | ✅ | See Icon | |
preset | string | done | ✅ | ✅ | Toast: done, error, none .Alert: done, error, none, spinner | |
duration | number | 3 | ✅ | ✅ | The lifetime of the toast (seconds) | |
titleColor | string | null | ✅ | ✅ | ||
shouldDismissByDrag | boolean | true | ✅ | The behavior on Android is click | ||
position | string | top | ✅ | Toast is displayed from top or bottom | ||
haptic | string | null | ✅ | success, warning, error, none | ||
shouldDismissByTap | boolean | true | ✅ | |||
borderRadius | number | null | ✅ | |||
blurBackdrop | number | null | ✅ | |||
backdropOpacity | number | null | ✅ | |||
backgroundColor | string | #ffffff | ✅ | ✅ |
icon | Type | Default value | Platform |
---|---|---|---|
uri | string | null | |
size | number | null |
shouldDismissByDrag
on Androidcallback
backgroundColor
We're trying to improve performance. If you have a better solution, please open a issue or pull request. Best regards!
See the contributing guide to learn how to contribute to the repository and the development workflow.
FAQs
test
We found that @baronha/ting demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).