Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Add support for slots #3

Open
whizkydee opened this issue Apr 9, 2019 · 1 comment
Open

Add support for slots #3

whizkydee opened this issue Apr 9, 2019 · 1 comment
Assignees
Labels
feature Request for a certain feature. next up Next item to work on in the todo list react-dropd Specific to the React package vue-dropd Specific to the Vue package

Comments

@whizkydee
Copy link
Owner

whizkydee commented Apr 9, 2019

Make it possible for the user to completely take control of dropd-list, dropd-item and dropd-toggle via Vue slots and a similar workaround in React, with relevant props bound to them.

⚒ Proposed API

  • React
<Dropd {...props}>
  <Dropd.List>
      ...
      <Dropd.Item>
        ...
    </Dropd.Item>
  </Dropd.List>

  <Dropd.Toggle>
    ...
  </Dropd.Toggle>
</Dropd>
  • Vue
<dropd {...props}>
  <ul slot="dropd-list">
    ...
    <li slot="dropd-item">
      ...
    </li>
  </ul>

  <button slot="dropd-toggle">
    ...
  </button>
</dropd>
@whizkydee whizkydee added feature Request for a certain feature. vue-dropd Specific to the Vue package labels Apr 9, 2019
@whizkydee whizkydee self-assigned this Apr 9, 2019
@whizkydee whizkydee changed the title Add support for Vue slots Add support for slots Apr 11, 2019
@whizkydee whizkydee added react-dropd Specific to the React package next up Next item to work on in the todo list labels Apr 11, 2019
@Youngestdev
Copy link

For react, a context-consumer relationship will be just fine I guess.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Request for a certain feature. next up Next item to work on in the todo list react-dropd Specific to the React package vue-dropd Specific to the Vue package
Projects
None yet
Development

No branches or pull requests

2 participants