Add auto_approver
This commit is contained in:
21
web/src/components/ui/switch.jsx
Normal file
21
web/src/components/ui/switch.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
|
||||
export const Switch = ({ checked, onCheckedChange, disabled }) => (
|
||||
<label className="relative inline-flex items-center cursor-pointer">
|
||||
<input
|
||||
type="checkbox"
|
||||
className="sr-only peer"
|
||||
checked={checked}
|
||||
onChange={(e) => onCheckedChange(e.target.checked)}
|
||||
disabled={disabled}
|
||||
/>
|
||||
<div className={`
|
||||
w-11 h-6 bg-gray-200 rounded-full peer
|
||||
peer-checked:after:translate-x-full peer-checked:bg-blue-600
|
||||
after:content-[''] after:absolute after:top-[2px] after:left-[2px]
|
||||
after:bg-white after:rounded-full after:h-5 after:w-5
|
||||
after:transition-all
|
||||
${disabled ? 'opacity-50 cursor-not-allowed' : ''}
|
||||
`}></div>
|
||||
</label>
|
||||
);
|
||||
Reference in New Issue
Block a user