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.
14 lines
481 B
TypeScript
14 lines
481 B
TypeScript
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)} />
|
|
);
|