fix(admin): Checkbox klickbar (z-index + stopPropagation) statt Button-Trigger
This commit is contained in:
parent
5b26193bf3
commit
9f11a0a8cc
2 changed files with 11 additions and 1 deletions
|
|
@ -261,10 +261,11 @@ export default function App() {
|
|||
<div key={`${s.fileName}-${s.name}`} className="sound-wrap">
|
||||
{isAdmin && (
|
||||
<input
|
||||
className="select-check"
|
||||
type="checkbox"
|
||||
checked={!!selectedSet[key]}
|
||||
onClick={(e) => { e.stopPropagation(); }}
|
||||
onChange={(e) => setSelectedSet((prev) => ({ ...prev, [key]: e.target.checked }))}
|
||||
style={{ position: 'absolute', left: 8, top: 8 }}
|
||||
/>
|
||||
)}
|
||||
<button className="sound" type="button" onClick={() => handlePlay(s.name, s.relativePath)} disabled={loading}>
|
||||
|
|
|
|||
|
|
@ -151,6 +151,15 @@ header p { opacity: .8; }
|
|||
|
||||
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
|
||||
.sound-wrap { position: relative; }
|
||||
.select-check {
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
top: 8px;
|
||||
z-index: 5;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
accent-color: #60a5fa;
|
||||
}
|
||||
.sound {
|
||||
padding: 18px 16px;
|
||||
border-radius: 14px;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue