Closed freds-dev closed 2 weeks ago
This pull request involves removing the ColorPicker component and replacing it with a native color input in the Graph component. Additionally, it includes some minor refactoring and cleanup.
ColorPicker
Graph
app/components/color-picker.tsx
TwitterPicker
react-color
package.json
app/components/device-detail/graph.tsx
Input
useRef
onClick
Button
This pull request involves removing the
ColorPicker
component and replacing it with a native color input in theGraph
component. Additionally, it includes some minor refactoring and cleanup.Removal of
ColorPicker
component:app/components/color-picker.tsx
: Removed theColorPicker
component that utilized theTwitterPicker
fromreact-color
.package.json
: Removed thereact-color
dependency.Changes in
Graph
component:app/components/device-detail/graph.tsx
: Removed the import ofColorPicker
and replaced it withInput
for native color input.app/components/device-detail/graph.tsx
: Added auseRef
for the color input element.app/components/device-detail/graph.tsx
: Modified theonClick
event to trigger the native color input instead of opening theColorPicker
.app/components/device-detail/graph.tsx
: Removed the color picker state from the dependency array of the effect.app/components/device-detail/graph.tsx
: Replaced theColorPicker
component with a hidden native color input that updates the color state.Minor refactoring:
app/components/device-detail/graph.tsx
: Refactored theButton
component for better readability.