Skip to content

Support html for slot property in show() dynamic api #60

@kytosai

Description

@kytosai

Is your feature request related to a problem? Please describe.

#57

Describe the solution you'd like

Today when experimenting with different modal plugins, I think that in addition to string support, we should support adding html content in the slot property instead of forcing to create unnecessary redundant components.

Example:

$vfm?.show({
  component: AlertModal,
  bind: {
    name: 'alert-modal',
  },
  on: {
    opened() {
      console.log('@opened');
    },
    closed() {
      console.log('@closed');
    }
  },
  slots: {
    default: 'Please enter <b class="tw-red-500">password</b> !', 
  },
});

however, assigning html directly like the one above can cause some error. So I think there should be an option that allows this to be done. But I have not thought of any ideas yet, hope you can support this feature!

Thank you !

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions