mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 07:54:57 -06:00
explicitly set color white background black
This commit is contained in:
parent
3c0e7057c8
commit
bec2295103
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
|
// insert new item into db and cast it into FoodItemRecord
|
||||||
const newItem = buildFoodItem(await createFoodItem(foodItem));
|
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
|
// notify food items state of new item
|
||||||
emitFoodItemsState(newItem);
|
emitFoodItemsState(newItem);
|
||||||
|
|
@ -32,7 +36,12 @@ export const withCreateFoodItemState = mapPropsStream(props$ => {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const error = formatError(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;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -212,14 +212,22 @@ export default compose(
|
||||||
setImagesLoading(true);
|
setImagesLoading(true);
|
||||||
await addImage({ foodItemId: foodItem.id, imageUri });
|
await addImage({ foodItemId: foodItem.id, imageUri });
|
||||||
setImagesLoading(false);
|
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) => {
|
updateAmount: ({ updateQuantity, foodItem }: Props) => async (quantity: Quantity) => {
|
||||||
if (!foodItem) {
|
if (!foodItem) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await updateQuantity({ foodItemId: foodItem.id, quantity });
|
await updateQuantity({ foodItemId: foodItem.id, quantity });
|
||||||
Snackbar.show({ title: 'Food updated.' });
|
Snackbar.show({ title: 'Food updated.', backgroundColor: 'black', color: 'white' });
|
||||||
},
|
},
|
||||||
toggleQuantityModal: ({ quantityModalOpen, setQuantityModalOpen }) => () => {
|
toggleQuantityModal: ({ quantityModalOpen, setQuantityModalOpen }) => () => {
|
||||||
setQuantityModalOpen(!quantityModalOpen);
|
setQuantityModalOpen(!quantityModalOpen);
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ export default compose(
|
||||||
await AsyncStorage.setItem('zipcode', props.zipcode);
|
await AsyncStorage.setItem('zipcode', props.zipcode);
|
||||||
props.setLoading(false);
|
props.setLoading(false);
|
||||||
getLocation();
|
getLocation();
|
||||||
Snackbar.show({ title: 'Zipcode updated.' });
|
Snackbar.show({ title: 'Zipcode updated.', backgroundColor: 'black', color: 'white' });
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
withHandlers({
|
withHandlers({
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue