phase2 / outline

Tooling infrastructure for modern web component development.
https://outline.phase2tech.com
MIT License
128 stars 27 forks source link

[Feature]: Move `_conditionalSlotTemplate` to a controller #302

Closed himerus closed 2 years ago

himerus commented 2 years ago

Describe the solution you'd like The code in outline-element.ts for the _conditionalSlotTemplate would probably be better as a controller we can use at will, and not include in every component we extend unless we want to. It is possible we also just add it AS a controller in outline-element so that every component still has it.

Find a way to make the code at https://github.com/phase2/outline/blob/next/src/components/base/outline-element/outline-element.ts#L18-L52 become a Reactive Controller.

Reasoning Eventually, we'd like to be able to individually package many of our controllers so that someone who isn't using the entire Outline package to utilize a handful of our very compelling controllers.