feat: finalize academy redesign and production readiness
Align admin, community, search, library, learning and course management with the mockup. Add saved courses, download history, public community feed, instructor directory, backend search, course views, admin content tools and community moderation. Harden API and Nginx for production.
This commit is contained in:
13
components/ui/Switch.tsx
Normal file
13
components/ui/Switch.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
|
||||
interface SwitchProps {
|
||||
checked: boolean;
|
||||
onChange: (checked: boolean) => void;
|
||||
label: string;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
/** Custom switch matching the mockup, instead of a native checkbox. */
|
||||
export const Switch: React.FC<SwitchProps> = ({ checked, onChange, label, disabled = false }) => (
|
||||
<button type="button" role="switch" aria-checked={checked} aria-label={label} className="sw" disabled={disabled} onClick={() => onChange(!checked)} />
|
||||
);
|
||||
Reference in New Issue
Block a user