Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/editors/slate/edit-bar/font-family.tsx
1697 views
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 FontFamilyMenu from "@cocalc/frontend/components/font-family";
7
import { formatAction } from "../format";
8
import { BUTTON_STYLE } from "./marks-bar";
9
10
export default function Component({ editor, font }) {
11
return (
12
<FontFamilyMenu
13
style={{
14
...BUTTON_STYLE,
15
height: "24px",
16
padding: "0px 0px 0px 2.5px",
17
fontSize: "13px",
18
}}
19
onClick={(font_family) => {
20
formatAction(editor, "font_family", font_family);
21
}}
22
font={font}
23
/>
24
);
25
}
26
27