feat: Optional full-width toggle for document display (#2869)
* Migration, model, presenter * Working implementation * fix: Account for table of contents * Checkbox -> Toggle * Checkbox -> Toggle
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import NotificationSetting from "~/models/NotificationSetting";
|
||||
import Checkbox from "~/components/Checkbox";
|
||||
import Toggle from "~/components/Toggle";
|
||||
|
||||
type Props = {
|
||||
setting?: NotificationSetting;
|
||||
@@ -20,7 +20,7 @@ const NotificationListItem = ({
|
||||
description,
|
||||
}: Props) => {
|
||||
return (
|
||||
<Checkbox
|
||||
<Toggle
|
||||
label={title}
|
||||
name={event}
|
||||
checked={!!setting}
|
||||
|
||||
@@ -8,12 +8,12 @@ import Collection from "~/models/Collection";
|
||||
import Integration from "~/models/Integration";
|
||||
import Button from "~/components/Button";
|
||||
import ButtonLink from "~/components/ButtonLink";
|
||||
import Checkbox from "~/components/Checkbox";
|
||||
import CollectionIcon from "~/components/CollectionIcon";
|
||||
import Flex from "~/components/Flex";
|
||||
import HelpText from "~/components/HelpText";
|
||||
import ListItem from "~/components/List/Item";
|
||||
import Popover from "~/components/Popover";
|
||||
import Toggle from "~/components/Toggle";
|
||||
import useToasts from "~/hooks/useToasts";
|
||||
|
||||
type Props = {
|
||||
@@ -82,13 +82,13 @@ function SlackListItem({ integration, collection }: Props) {
|
||||
<Events>
|
||||
<h3>{t("Notifications")}</h3>
|
||||
<HelpText>{t("These events should be posted to Slack")}</HelpText>
|
||||
<Checkbox
|
||||
<Toggle
|
||||
label={t("Document published")}
|
||||
name="documents.publish"
|
||||
checked={integration.events.includes("documents.publish")}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
<Checkbox
|
||||
<Toggle
|
||||
label={t("Document updated")}
|
||||
name="documents.update"
|
||||
checked={integration.events.includes("documents.update")}
|
||||
|
||||
Reference in New Issue
Block a user