react-native-root-toast icon indicating copy to clipboard operation
react-native-root-toast copied to clipboard

How can I change the default configuration?

Open summmmer opened this issue 8 years ago • 1 comments

How can I change the default configuration?

summmmer avatar Aug 16 '17 03:08 summmmer

I think you can make a abstraction of Toast,for example

import Toast from 'react-native-root-toast'

export default class iToast {
	static options = {
		//default options
		position: Toast.positions.CENTER,
	}
	static show(message, options = {}) {
		Toast.show(message, Object.assign({}, iToast.options, options))
	}
}

lragon avatar Sep 20 '17 03:09 lragon