Implement Entity Component in React + TS #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR solves issue #54
This is how the project structure looks now:
Overview
EntityExampleComponent.tsx
is a temporary example component that displays the card and can be used as an example on how to use this component.EntityExampleComponent.tsx
shall be deleted later when the routing of the frontend is setup usingReact-Router
.Card Component (
src/components/Card.tsx
)The main component is
src/components/Card.tsx
which accepts fewprops
.It displays information relevant to the props passed so that each page renders relevant details.
For tooltip I have used
react-tooltip
package.The types and constants are exported from separate files.
Also added
dark mode
andlight mode
functionalityUsing variables for colors in Tailwind CSS for consistency in styling.
Refer to this video for a quick look at the output:
https://www.loom.com/share/2e5be837be864bfcb5d02dff9ba5af17?sid=e87e552f-3ac4-4714-91da-04c4b5772d2c