-
Notifications
You must be signed in to change notification settings - Fork 157
Conversation
@@ -1,46 +1,51 @@ | |||
<template> | |||
<div :class="suit()" v-if="state"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this fit is.css?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it fits since the full DOM widget is under the slot
. It's just that we have now an extra (useless) div
on top of the widget.
exports[`custom default render renders correctly 1`] = ` | ||
|
||
<div> | ||
<div class> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty class, but not an issue I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep but we do not care that much since it's the result of the custom render. I add a class only when canRefine
is false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code seems good here 🔥
We didn't pick the solution with the top level |
* feat(Menu): update props * feat(Menu): remove useless label props for slots * feat(Menu): add searchable as TODO * feat(Menu): update stories with more use cases * style: run Prettier * refactor(Menu): remove the className on the parent div * docs(Menu): update * fix(Menu): avoid the extra div
Summary
This PR implements the
Menu
widget.You can try the widget on Storybook.
Questions
One thing to note is that I scoped the top level
div
of the widget under theslot
. It avoids to still have the top level className when you completely rewrite the widget. But it introduce a top leveldiv
on top of the widget (see picture below). It can be removed when Vue will support a "Fragment" like component. Do we want to implement this behaviour on all the widgets?With default render
With custom render