direflow icon indicating copy to clipboard operation
direflow copied to clipboard

feat: add useNamedSlots to support named slots

Open FrankKai opened this issue 2 years ago • 0 comments

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

FrankKai avatar Mar 31 '22 08:03 FrankKai