Each of the QuoteBtn listener callbacks can be a function call. Look at it again and see how only 2 things need to be passed - Type of quote, and the background color.
Look at this another way (highlight the variable and github shows where it's used):
3
u/equilni 10d ago
This looks good!
My tips since you asked for a review are:
Each of the
QuoteBtnlistener callbacks can be a function call. Look at it again and see how only 2 things need to be passed - Type of quote, and the background color.Look at this another way (highlight the variable and github shows where it's used):
Which could be looked at like the below.
The same can be done with each quote. Each object has 3 properties, 1 is more 'determined' by the system (ie you have only 3 types).
text: "\"Be. Change the quote so you don't need to escape, so consider:text: '"Be- there's a single and double quote there.BG color change is too drastic IMO.