bcc-code / bcc-design

Packages, assets and documentation to use the BCC Design System
https://developer.bcc.no/bcc-design
Apache License 2.0
3 stars 5 forks source link

chore: Add BccDialog component to design library #307

Open lukaspoloki opened 1 month ago

lukaspoloki commented 1 month ago

Change summary

Change type

Closes #306

github-actions[bot] commented 1 month ago

Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-coast-028fe6203-307.westeurope.3.azurestaticapps.net

github-actions[bot] commented 1 month ago

Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-coast-028fe6203-307.westeurope.3.azurestaticapps.net

lukaspoloki commented 1 month ago

Good question, these are a two seperate components in DS and are used in different scenarios I suppose, so I am not sure what the strategy would be. If that makes sense I can just adjust the modal, and maybe designers could just change the dialog names to modals @laurensgroeneveld

laurensgroeneveld commented 1 month ago

@lukaspoloki Yes that would be my preference, otherwise we have to maintain two almost identical components 😅 And also makes it less clear for developers which one they should take.

lukaspoloki commented 1 month ago

@laurensgroeneveld the more I think about it, the less sense it makes to merge these two, as there are different use-cases. For example, modals are not destructive, and the buttons are not stretched to the full width in modals. Merging them would make the implementation quite messy

StevenMalaihollo commented 3 weeks ago

@lukaspoloki sorry for the delay looking at this.

I agree with Laurens' comment that it's similar to the modal. If there still is a need for unique behaviour in the BccModal component, I'd prefer adding a context: 'modal' | 'default' prop. Also because the code of BccModal vs BccDialog is largely copied over. But maybe I am missing some aspect.