CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/account/editor-settings/font-size.tsx
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { InputNumber } from "antd";
7
import { LabeledRow } from "@cocalc/frontend/components";
8
import { useIntl } from "react-intl";
9
10
interface Props {
11
font_size: number;
12
on_change: (name: string, value: number) => void;
13
}
14
15
export function EditorSettingsFontSize(props: Props) {
16
const intl = useIntl();
17
18
return (
19
<LabeledRow
20
label={intl.formatMessage({
21
id: "account.editor-settings.font-size.label",
22
defaultMessage: "Default global font size",
23
})}
24
className="cc-account-prefs-font-size"
25
>
26
<InputNumber
27
onChange={(n) => props.on_change("font_size", n ?? 14)}
28
min={5}
29
max={32}
30
value={props.font_size}
31
addonAfter="px"
32
/>
33
</LabeledRow>
34
);
35
}
36
37