Remove duplicative Toggle component (#3028)
fix: Tidy some styling and spacing issues in settings
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import NotificationSetting from "~/models/NotificationSetting";
|
||||
import Toggle from "~/components/Toggle";
|
||||
import Switch from "~/components/Switch";
|
||||
|
||||
type Props = {
|
||||
setting?: NotificationSetting;
|
||||
@@ -20,7 +20,7 @@ const NotificationListItem = ({
|
||||
description,
|
||||
}: Props) => {
|
||||
return (
|
||||
<Toggle
|
||||
<Switch
|
||||
label={title}
|
||||
name={event}
|
||||
checked={!!setting}
|
||||
|
||||
@@ -13,7 +13,7 @@ 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 Switch from "~/components/Switch";
|
||||
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>
|
||||
<Toggle
|
||||
<Switch
|
||||
label={t("Document published")}
|
||||
name="documents.publish"
|
||||
checked={integration.events.includes("documents.publish")}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
<Toggle
|
||||
<Switch
|
||||
label={t("Document updated")}
|
||||
name="documents.update"
|
||||
checked={integration.events.includes("documents.update")}
|
||||
|
||||
Reference in New Issue
Block a user