You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our case, ConfirmModal contain only two buttons, the "Save" and "Cancel" buttons.
By passing the buttons data as an array to the ConfirmModal component, we can enhance its flexibility and reusability.
The problem with this approach is that we no longer have a standard way to display things. In the confirm modal we need consistency in how the confirm and the cancel button are displayed (order, style etc...).
For confirm modals which need more than 2 buttons, it's up to the project (NMRium) to define a special component which allow to handle the special case.
If we allow this in react-science, people will start misusing it.
In our case,
ConfirmModal
contain only two buttons, the "Save" and "Cancel" buttons.By passing the buttons data as an array to the
ConfirmModal
component, we can enhance its flexibility and reusability.We can then utilize the updated
ConfirmModal
with the array of buttons inNMRium
https://github.com/cheminfo/nmrium/blob/05e40c0d1cdc1a58743b6d7bfbf7cac8ce7c998b/src/component/EventsTrackers/KeysListenerTracker.tsx#L118-L127
The text was updated successfully, but these errors were encountered: