Open chrisvaillancourt opened 1 year ago
Replace the name prop with a title slot.
The icon component uses a name prop to populate the <title> element's content.
<title>
We should remove the name prop and add a title slot <slot name="title">. This approach makes it the component more declarative and allows us to only render the <title> if content is passed into the title slot.
<slot name="title">
Also look into refactoring how title works.
For example, if we have an icon within a button, we want the title to appear when hovering the button instead of the icon within the button.
TLDR
Replace the name prop with a title slot.
Summary
The icon component uses a name prop to populate the
<title>
element's content.We should remove the name prop and add a title slot
<slot name="title">
. This approach makes it the component more declarative and allows us to only render the<title>
if content is passed into the title slot.