-
Notifications
You must be signed in to change notification settings - Fork 39
dark mode added to the component #42
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: master
Are you sure you want to change the base?
Conversation
| "dependencies": { | ||
| "clsx": "^1.2.1" | ||
| "clsx": "^1.2.1", | ||
| "react-todo-component": "^2.0.3" |
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.
Remove react-todo-component dependency
| setItems([...updatedItems, ...completedItems]); | ||
| }; | ||
|
|
||
| const [theme, setTheme] = useState("light-theme"); |
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.
As people will use react-todo as an external dependency. Can you expose a prop to control the theme? instead of using local state. Just make light-theme default value for the prop.
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.
I am not so sure how to create a prop that can be later used as optional feature. As I am very new in react, I only know Javascript, I don't have idea about Typescript. But I will let you know if I am able to make a prop for the feature.
| use-latest "^1.0.0" | ||
|
|
||
| react-todo-component@^2.0.3: | ||
| version "2.0.3" |
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.
Not needed react-todo-component.
|
@Anurag-NURA thanks. I have added a few review comments please have a look. |
Created the dark mode feature for the component