UNPKG

@sendbird/uikit-react-native-foundation

Version:

A foundational UI kit for building chat-enabled React Native apps.

15 lines 565 B
/** * select method factory * Select method returns the most fitting value for the color scheme you are currently running on. * @param colorScheme * @returns Function * */ const createSelectByColorScheme = colorScheme => { return options => { const value = options[colorScheme ?? 'default'] ?? options['light'] ?? options['dark'] ?? options['default']; if (!value) throw Error('Not provided any selectable color scheme values'); return value; }; }; export default createSelectByColorScheme; //# sourceMappingURL=createSelectByColorScheme.js.map