-
Notifications
You must be signed in to change notification settings - Fork 3
FEAT: Implement toggle for starred fines #1594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
AleksanderEvensen
left a comment
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.
Mangler fortsatt litt for at dette skal være helt ferdig
src/pages/Groups/fines/FineItem.tsx
Outdated
| <button | ||
| onClick={toggleStar} | ||
| className={cn( | ||
| 'ml-auto flex items-center px-2 py-1 rounded-md border text-sm transition', | ||
| fine.starred | ||
| ? 'text-yellow-500 border-yellow-50 hover:bg-yellow-100' | ||
| : 'text-gray-400 border-gray-300 hover:text-yellow-500 hover:border-yellow-500', | ||
| )}> | ||
| <Star className={cn('w-4 h-4', fine.starred && 'fill-yellow-500')} /> | ||
| </button> |
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.
Vi har en egen komponent for knapper. Jeg tror du kan slippe å bruke mye av stylingen her dersom du bruker den
Description
This update makes it possible to star or unstar fines from the frontend.
A star button has been added, and when users click it, the fine’s starred status is updated using the backend endpoint.
Pull request checklist
Please check if your PR fulfills the following requirements: