Button list component
Last updated on 11/6/2024@mrbirddev
Image and icon
If you want to set icon. You should leave image field empty.
And if you want to put the image/icon on the right. Apply the following to Button image CSS
left: auto;
right: .5rem;
DOM structure
A Button list component is composed like this in the HTML DOM structure.
<div style="display: flex; width: 100%"> <!-- CSS applies here -->
<a href="" ...> <!-- Button CSS applies here-->
<div
style="position: absolute; top: .5rem; bottom: .5rem; overflow: hidden; left: .5rem;"
<!-- Button image CSS applies here-->
>
{image || icon}
</div>
<span>
{button text}
</span>
</a>
...
</div>