Closed RobinBoers closed 11 months ago
Hi! I extended the pagination component to allow custom slots, like this:
<.pagination class="mb-5" current_page={@page} total_pages={@total_pages}> <:prev> <span phx-click="prev-page" class="pc-pagination__item__previous"> <Heroicons.chevron_left solid class="pc-pagination__item__previous__chevron" /> </span> </:prev> <:page :let={page}> <span phx-click="to-page" phx-value-page={page}> <%= page %> </span> </:page> <:next> <span phx-click="next-page" class="pc-pagination__item__next"> <Heroicons.chevron_right solid class="pc-pc-pagination__item__next__chevron" /> </span> </:next> </.pagination>
It is completely optional. If the slots don't exist, they won't be used. I also added an test to test this change.
I removed the brackets in attrs for a lot of components too, and formatted the project using styler.
attr
Nvm, I'll put formatting in an seperate PR.
Hi! I extended the pagination component to allow custom slots, like this:
It is completely optional. If the slots don't exist, they won't be used. I also added an test to test this change.
I removed the brackets in
attr
s for a lot of components too, and formatted the project using styler.