mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-28 16:06:41 +01:00
move fullScreenButton to be shared, remove md settings
This commit is contained in:
@@ -10,7 +10,7 @@ import { ResizeBottomRight } from "@src/assets/icons";
|
||||
import useMonacoCustomizations, {
|
||||
IUseMonacoCustomizationsProps,
|
||||
} from "./useMonacoCustomizations";
|
||||
import FullScreenButton from "./FullScreenButton";
|
||||
import FullScreenButton from "@src/components/FullScreenButton";
|
||||
import { spreadSx } from "@src/utils/ui";
|
||||
|
||||
export interface ICodeEditorProps
|
||||
@@ -73,6 +73,7 @@ export default function CodeEditor({
|
||||
return (
|
||||
<TrapFocus open={fullScreen}>
|
||||
<Box
|
||||
component="div"
|
||||
sx={[boxSx, ...spreadSx(containerProps?.sx)]}
|
||||
style={fullScreen ? { height: "100%" } : {}}
|
||||
>
|
||||
|
||||
@@ -13,7 +13,7 @@ import { ResizeBottomRight } from "@src/assets/icons";
|
||||
import useMonacoCustomizations, {
|
||||
IUseMonacoCustomizationsProps,
|
||||
} from "./useMonacoCustomizations";
|
||||
import FullScreenButton from "./FullScreenButton";
|
||||
import FullScreenButton from "@src/components/FullScreenButton";
|
||||
import { spreadSx } from "@src/utils/ui";
|
||||
|
||||
export interface IDiffEditorProps
|
||||
@@ -64,6 +64,7 @@ export default function DiffEditor({
|
||||
return (
|
||||
<TrapFocus open={fullScreen}>
|
||||
<Box
|
||||
component="div"
|
||||
sx={[boxSx, ...spreadSx(containerProps?.sx)]}
|
||||
style={fullScreen ? { height: "100%" } : {}}
|
||||
>
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
import { ISettingsProps } from "@src/components/fields/types";
|
||||
import MultiSelect from "@rowy/multiselect";
|
||||
|
||||
const languages = [
|
||||
"javascript",
|
||||
"typescript",
|
||||
"json",
|
||||
"html",
|
||||
"css",
|
||||
"scss",
|
||||
"shell",
|
||||
"yaml",
|
||||
"xml",
|
||||
"ruby",
|
||||
"python",
|
||||
"php",
|
||||
"markdown",
|
||||
"rust",
|
||||
"csharp",
|
||||
"cpp",
|
||||
"c",
|
||||
"java",
|
||||
"go",
|
||||
"plaintext",
|
||||
];
|
||||
|
||||
export default function Settings({ config, onChange }: ISettingsProps) {
|
||||
return (
|
||||
<MultiSelect
|
||||
searchable
|
||||
multiple={false}
|
||||
options={languages}
|
||||
value={config.language ?? "javascript"}
|
||||
onChange={(value) => {
|
||||
onChange("language")(value);
|
||||
}}
|
||||
label="Language"
|
||||
labelPlural="languages"
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -6,10 +6,6 @@ import { Markdown as MarkdownIcon } from "@src/assets/icons";
|
||||
import BasicCell from "./BasicCell";
|
||||
import withSideDrawerEditor from "@src/components/Table/editors/withSideDrawerEditor";
|
||||
|
||||
const Settings = lazy(
|
||||
() => import("./Settings" /* webpackChunkName: "Settings-markdown" */)
|
||||
);
|
||||
|
||||
const SideDrawerField = lazy(
|
||||
() =>
|
||||
import(
|
||||
@@ -29,6 +25,5 @@ export const config: IFieldConfig = {
|
||||
TableCell: withBasicCell(BasicCell),
|
||||
TableEditor: withSideDrawerEditor(BasicCell),
|
||||
SideDrawerField,
|
||||
settings: Settings,
|
||||
};
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user