mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 06:14:55 -06:00
Merge branch '108-text-on-snack-bar-is-black' into 'master'
Resolve "Text on Snack Bar is black, should be white" Closes #108 See merge request aretherecookies/ui-mobile!23
This commit is contained in:
commit
c8e2bb2889
3 changed files with 22 additions and 5 deletions
|
|
@ -19,7 +19,11 @@ export const withCreateFoodItemState = mapPropsStream(props$ => {
|
|||
// insert new item into db and cast it into FoodItemRecord
|
||||
const newItem = buildFoodItem(await createFoodItem(foodItem));
|
||||
|
||||
Snackbar.show({ title: foodItem.name + ' added' });
|
||||
Snackbar.show({
|
||||
title: foodItem.name + ' added',
|
||||
backgroundColor: 'black',
|
||||
color: 'white',
|
||||
});
|
||||
|
||||
// notify food items state of new item
|
||||
emitFoodItemsState(newItem);
|
||||
|
|
@ -32,7 +36,12 @@ export const withCreateFoodItemState = mapPropsStream(props$ => {
|
|||
} catch (err) {
|
||||
const error = formatError(err);
|
||||
|
||||
Snackbar.show({ title: error, duration: Snackbar.LENGTH_LONG });
|
||||
Snackbar.show({
|
||||
title: error,
|
||||
duration: Snackbar.LENGTH_LONG,
|
||||
backgroundColor: 'black',
|
||||
color: 'white',
|
||||
});
|
||||
|
||||
throw error;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,14 +212,22 @@ export default compose(
|
|||
setImagesLoading(true);
|
||||
await addImage({ foodItemId: foodItem.id, imageUri });
|
||||
setImagesLoading(false);
|
||||
setTimeout(() => Snackbar.show({ title: 'Food updated.' }), 700);
|
||||
setTimeout(
|
||||
() =>
|
||||
Snackbar.show({
|
||||
title: 'Food updated.',
|
||||
backgroundColor: 'black',
|
||||
color: 'white',
|
||||
}),
|
||||
700
|
||||
);
|
||||
},
|
||||
updateAmount: ({ updateQuantity, foodItem }: Props) => async (quantity: Quantity) => {
|
||||
if (!foodItem) {
|
||||
return;
|
||||
}
|
||||
await updateQuantity({ foodItemId: foodItem.id, quantity });
|
||||
Snackbar.show({ title: 'Food updated.' });
|
||||
Snackbar.show({ title: 'Food updated.', backgroundColor: 'black', color: 'white' });
|
||||
},
|
||||
toggleQuantityModal: ({ quantityModalOpen, setQuantityModalOpen }) => () => {
|
||||
setQuantityModalOpen(!quantityModalOpen);
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ export default compose(
|
|||
await AsyncStorage.setItem('zipcode', props.zipcode);
|
||||
props.setLoading(false);
|
||||
getLocation();
|
||||
Snackbar.show({ title: 'Zipcode updated.' });
|
||||
Snackbar.show({ title: 'Zipcode updated.', backgroundColor: 'black', color: 'white' });
|
||||
},
|
||||
}),
|
||||
withHandlers({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue