| Conditions | 3 |
| Total Lines | 6 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | function useToastType(toast, defaultOptions = {}) { |
||
| 2 | const types = ["warn", "success", "error", "info", "primary"]; |
||
| 3 | const toastType = {}; |
||
| 4 | types.map(type => toastType[type] = (message, options = defaultOptions) => toast(message, type, options)); |
||
| 5 | return toastType; |
||
| 6 | } |
||
| 7 | |||
| 8 | export default useToastType; |