Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

feat: add useNamedSlots to support named slots #261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FrankKai
Copy link

What does this pull request introduce? Please describe
Add useNamedSlots to support named slots.

How did you verify that your changes work as expected? Please describe
Add useNamedSlots option for DireflowComponent.create's configuration.

Example
Please describe how we can try out your changes

import { DireflowComponent } from "direflow-component";

export default DireflowComponent.create({
  configuration: {
    tagname: "test-comp",
    useShadow: true,
    useNamedSlots: ['slot1', 'slot2']
  },
});
<test-comp>
    <p slot="slot1">I'm slot1</p>

    <div slot="slot2">I'm slot2</div>
</test-comp>

Screenshots
If applicable, add screenshots to demonstrate your changes.

image

Version
Which version is your changes included in?
3.5.4

Did you remember to update the version of Direflow as explained here:
https://github.com/Silind-Software/direflow/blob/master/CONTRIBUTING.md#version

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant