liinnjohansson / todays-lunch

0 stars 1 forks source link

10 create tags for bistro card #43

Closed liinnjohansson closed 3 years ago

liinnjohansson commented 3 years ago

close #10

Created OfferTag - component which takes in a string infoText-prop that describes the type of offer. OfferTag does not know anything about the bistros so it can be reused in other components/screens if neccessary.

BistroCard is rendering tags depending on booleans set for selected bistro. If the boolean is false, no tag will appear. If boolean is true the tag will get a string set that matches the boolean, ex. "Uteservering". The string is sent to OfferTag as a prop, as explained above.

For OfferTag I have used Surface from React Native Paper to also get a nice background shadow effect. It is not very visible, but gives a subtle depth.

Alternations from original design:

tags

liinnjohansson commented 3 years ago

The code looks good, nice solution of issue !

  • Maybe I think the name infoText could be called displayText or printText instead. But small thing and don't need to be revised.
    • NOTE. Some problem occurred on MenuScreen blackbox ! It doesn't cover full wifth.

Yes, dispayText is good! Can switch to that. Concerning the blackbox. Have you got the latest updates? Because that is precisely the issue I think I corrected in the #42 PR. But maybe it is still not correct?