fix: remove scrollbar on x-axis in toc (#3008)
* fix: remove overflow x in toc * fix: use useMemo * fix: parsing /settings/integrations/slack * fix: no transparency in firefox * fix: remove debounced fn
This commit is contained in:
@@ -97,6 +97,7 @@ const Sticky = styled.div`
|
||||
box-shadow: 1px 0 0 ${(props) => props.theme.divider};
|
||||
margin-top: 40px;
|
||||
margin-right: 52px;
|
||||
min-width: 204px;
|
||||
width: 204px;
|
||||
min-height: 40px;
|
||||
overflow-y: auto;
|
||||
@@ -113,8 +114,6 @@ const Heading = styled.h3`
|
||||
const Empty = styled(HelpText)`
|
||||
margin: 1em 0 4em;
|
||||
padding-right: 2em;
|
||||
min-width: 16em;
|
||||
width: 16em;
|
||||
font-size: 14px;
|
||||
`;
|
||||
|
||||
@@ -142,8 +141,6 @@ const Link = styled.a`
|
||||
`;
|
||||
|
||||
const List = styled.ol`
|
||||
min-width: 14em;
|
||||
width: 14em;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
`;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { debounce } from "lodash";
|
||||
import { observer } from "mobx-react";
|
||||
import { BeakerIcon } from "outline-icons";
|
||||
import { useState } from "react";
|
||||
@@ -21,24 +20,17 @@ function Features() {
|
||||
collaborativeEditing: team.collaborativeEditing,
|
||||
});
|
||||
|
||||
const showSuccessMessage = React.useCallback(
|
||||
debounce(() => {
|
||||
showToast(t("Settings saved"), {
|
||||
type: "success",
|
||||
});
|
||||
}, 250),
|
||||
[t, showToast]
|
||||
);
|
||||
|
||||
const handleChange = React.useCallback(
|
||||
async (ev: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const newData = { ...data, [ev.target.name]: ev.target.checked };
|
||||
setData(newData);
|
||||
|
||||
await auth.updateTeam(newData);
|
||||
showSuccessMessage();
|
||||
showToast(t("Settings saved"), {
|
||||
type: "success",
|
||||
});
|
||||
},
|
||||
[auth, data, showSuccessMessage]
|
||||
[auth, data, showToast, t]
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user