mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-19 01:17:18 +02:00
https://linear.app/unleash/issue/2-1484/ui-create-an-admin-banners-configuration-page Adds a new "Banners" page to the admin UI. This first iteration allows admins to list and preview all configured message banners, toggle them (whether they are currently visible to all users or not), and remove them. Next step will be creating the modal for "new" and "edit" operations. ### Admin menu  ### Banners page 
24 lines
574 B
TypeScript
24 lines
574 B
TypeScript
import { Switch, Tooltip } from '@mui/material';
|
|
import { TextCell } from '../TextCell/TextCell';
|
|
|
|
interface IToggleCellProps {
|
|
checked: boolean;
|
|
setChecked: (value: boolean) => void;
|
|
title?: string;
|
|
}
|
|
|
|
export const ToggleCell = ({
|
|
checked,
|
|
setChecked,
|
|
title,
|
|
}: IToggleCellProps) => (
|
|
<TextCell>
|
|
<Tooltip title={title ? title : checked ? 'Disable' : 'Enable'} arrow>
|
|
<Switch
|
|
checked={checked}
|
|
onChange={(e) => setChecked(e.target.checked)}
|
|
/>
|
|
</Tooltip>
|
|
</TextCell>
|
|
);
|