Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
sudongyuer committed Jul 23, 2022
1 parent 78ea2fe commit 85f1b43
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 26 deletions.
5 changes: 5 additions & 0 deletions .changeset/ninety-ads-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vite-plugin-react-inspector": patch
---

release v0.2.3
3 changes: 0 additions & 3 deletions packages/vite-plugin-react-inspector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@
"lint-fix": "eslint . --fix",
"try": "tsx src/index.ts"
},
"peerDependencies": {
"react-draggable": "^4.4.5"
},
"dependencies": {
"@babel/core": "^7.18.9",
"@babel/preset-env": "^7.18.9",
Expand Down
40 changes: 17 additions & 23 deletions packages/vite-plugin-react-inspector/src/Toggle/Toggle.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useCallback, useEffect, useState } from 'react'
import Draggable from 'react-draggable'
import './toggle.css'
function Toggle() {
const [active, setActive] = useState(false)
Expand Down Expand Up @@ -44,29 +43,24 @@ function Toggle() {
}
return (
<div>
<Draggable
handle=".handle"
>
<div>
<div className="toggleWrapper">
<div className="handle">Drag Here</div>
<input type="checkbox" defaultChecked="false" className="dn" id="dn" onChange={handleChange}/>
<label htmlFor="dn" className="toggle">
<span className="toggle__handler">
<span className="crater crater--1"></span>
<span className="crater crater--2"></span>
<span className="crater crater--3"></span>
</span>
<span className="star star--1"></span>
<span className="star star--2"></span>
<span className="star star--3"></span>
<span className="star star--4"></span>
<span className="star star--5"></span>
<span className="star star--6"></span>
</label>
</div>
<div>
<div className="toggleWrapper">
<input type="checkbox" defaultChecked="false" className="dn" id="dn" onChange={handleChange}/>
<label htmlFor="dn" className="toggle">
<span className="toggle__handler">
<span className="crater crater--1"></span>
<span className="crater crater--2"></span>
<span className="crater crater--3"></span>
</span>
<span className="star star--1"></span>
<span className="star star--2"></span>
<span className="star star--3"></span>
<span className="star star--4"></span>
<span className="star star--5"></span>
<span className="star star--6"></span>
</label>
</div>
</Draggable>
</div>
<div className="file-detail" style={{
visibility: `${active ? 'visible' : 'hidden'}`,
top: `${y}px`,
Expand Down

0 comments on commit 85f1b43

Please sign in to comment.