Skip to content
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

Replace praise-* class names with React components #482

Closed
kristoferlund opened this issue Jun 20, 2022 · 0 comments · Fixed by #537
Closed

Replace praise-* class names with React components #482

kristoferlund opened this issue Jun 20, 2022 · 0 comments · Fixed by #537
Assignees

Comments

@kristoferlund
Copy link
Member

kristoferlund commented Jun 20, 2022

@pkretzschmar, this is part of a larger refactor of the frontend. Replacing css classes with React components is in many cases a good idea, for example:

Instead of css/Tailwind classes:

praise-button
praise-button-outline

Create React components:

<Button/>
<Button outline/>

praise-box and praise-page can also be refactored.

See Tailwind tips here: https://tailwindcss.com/docs/reusing-styles#extracting-components-and-partials

Another refactor is: encapsulating common patterns in more generic React components. Dialog from '@headlessui/react' for example is used in some places but used slightly different each time.

What other components could be made generic?

Pinging @nebs-dev @mattyg and @Vyvy-vi as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants