Description:
Header components currently support the following buttons that are pre-determined and can be configured to be shown or hidden:
Notification Button
Audio Button
Close Button
However, custom buttons are not allowed. It would be great to allow users to define their own button components for the header as well. Below I share a possible approach:
Include a buttons prop in header that takes in either a keyword (string) or a custom component (which would be buttons provided by the user)
By default, buttons prop would look as such: ["notification", "audio", close"] (it essentially contains 3 keywords representing the default buttons)
A user can specify a custom component within it so for example: ["notification", <CustomButton/>, "audio", "close"]
Buttons would be rendered in the order specified within the array
Feel free to take on a different approach if you have other ideas. Bear in mind that users need to be able to control the order of the buttons and that the configuration should be kept as simple as possible.
Description: Header components currently support the following buttons that are pre-determined and can be configured to be shown or hidden:
However, custom buttons are not allowed. It would be great to allow users to define their own button components for the header as well. Below I share a possible approach:
buttons
prop inheader
that takes in either a keyword (string) or a custom component (which would be buttons provided by the user)buttons
prop would look as such:["notification", "audio", close"]
(it essentially contains 3 keywords representing the default buttons)["notification", <CustomButton/>, "audio", "close"]
Feel free to take on a different approach if you have other ideas. Bear in mind that users need to be able to control the order of the buttons and that the configuration should be kept as simple as possible.
Related to #23