shizuko-akamoto / Trecipe

CPSC 436I Project (2020S)
1 stars 3 forks source link

Implement menu and icon only button #39

Closed knox153 closed 4 years ago

knox153 commented 4 years ago

Closes #8

To reduce code duplication, button with icon only is added by modifying the existing Button component. Let me know if we want to refactor this into another component :smiley:.

  1. Added a generic Menu component
    • Any component/HTML element can toggle this menu
    • Position, height, and width props are optional
    • The menu will always be placed within the window
  2. Modified Button component to support icon only
    • An icon only button can be created by specifying the text is an empty string '' and adding an icon on the Button component.
    • Added some new classnames for the Button component which will be used to load a different style.
  3. Created a menu for Trecipe card
    • An example of using the icon button to toggle the menu
    • Also updated fontawesome.tsx to include three new icons