N00nDay / stwui

Opinionated yet customizable Svelte-TailwindCSS component library
stwui.vercel.app
MIT License
451 stars 21 forks source link

Set modal size and position #169

Closed bangdragon closed 1 year ago

bangdragon commented 1 year ago

I want to set modal size only 4/5 of screen and position at center of screen. It seem this feature is mising

N00nDay commented 1 year ago

You should be able to do this by passing the desired classes or styles to the component.

bangdragon commented 1 year ago

I will try i

You should be able to do this by passing the desired classes or styles to the component.

I will try it. Thanks

N00nDay commented 1 year ago

You can do this with the following:

<Modal class="flex flex-col w-full items-center justify-center !p-0" ...>
  <Modal.Content slot="content" class="w-4/5  max-w-full" ...>
    ...
  </Modal.Content>
</Modal>
N00nDay commented 1 year ago

@bangdragon were you able to solve this issue?

N00nDay commented 1 year ago

Closing this issue as I have confirmed this can be fixed by passing tailwind classes and creator is non-responsive.