mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
refactor(core): separate editor & doc mode (#7873)
doc.mode -> primaryMode
(*new) editor.mode
New Service:
editor service
Change Mode:
```
const editor = useService(EditorService).editor;
editor.setMode('page')
```
Change primary mode
```
const editor = useService(EditorService).editor;
editor.doc.setPrimaryMode('page')
```
This commit is contained in:
@@ -6,7 +6,7 @@ type SimpleRadioItem = string;
|
||||
export interface RadioProps extends RadioGroupItemProps {
|
||||
items: RadioItem[] | SimpleRadioItem[];
|
||||
value: any;
|
||||
onChange: (value: any) => void;
|
||||
onChange?: (value: any) => void;
|
||||
|
||||
/**
|
||||
* Total width of the radio group, items will be evenly distributed
|
||||
|
||||
Reference in New Issue
Block a user