UNPKG

@zwdvidal/react-native-dropdownalert

Version:

A simple alert to notify users about new chat messages, something went wrong or everything is ok.

12 lines (11 loc) 352 B
const validateType = function(type) { const types = ['info', 'warn', 'error', 'success', 'custom']; if (!type || type.length === 0 || types.includes(type) == false) { console.warn('Invalid DropdownAlert type. Available types: info, warn, error, success or custom'); return false; } return true; }; module.exports = { validateType, };