cinemataztic / cine-ui

0 stars 0 forks source link

Modal component #39

Closed sandhana14 closed 2 years ago

sandhana14 commented 2 years ago

Few comments:

  • I removed the color variation option in my last commit. It's not needed now, and not sure it will be later on. The modal background color will depend if we're using dark or light theme.
  • I think the buttons should be optional: not all modals will have the same button texts and not all modals will have a danger button. We should allow flexibility here.

One option could be to allow passing a buttons prop to the modal: [{variant: enum (primary, secondary, tertiary), text: 'string', onClick: func, danger: 'boolean'}

Then we could render one button per element in the array.

Content(children prop) that I'm passing to the modal component has the flexibility. We can pass any contents without/with button to the modal as a children. So, it has the flexibility of passing any contents. @alkiko