Skip to content

Commit

Permalink
refactor: rename fullscreen to initialFullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
robinpyon committed May 10, 2024
1 parent 63df80d commit 024786c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ export function PortableTextInput(props: PortableTextInputProps): ReactNode {
const {
editorRef: editorRefProp,
elementProps,
fullscreen: fullscreenProp,
hotkeys,
initialFullscreen: initialFullscreenProp,
markers = EMPTY_ARRAY,
onChange,
onCopy,
Expand Down Expand Up @@ -119,7 +119,7 @@ export function PortableTextInput(props: PortableTextInputProps): ReactNode {
const {t} = useTranslation()
const [ignoreValidationError, setIgnoreValidationError] = useState(false)
const [invalidValue, setInvalidValue] = useState<InvalidValue | null>(null)
const [isFullscreen, setIsFullscreen] = useState(fullscreenProp ?? false)
const [isFullscreen, setIsFullscreen] = useState(initialFullscreenProp ?? false)
const [isActive, setIsActive] = useState(false)
const [isOffline, setIsOffline] = useState(false)
const [hasFocusWithin, setHasFocusWithin] = useState(false)
Expand Down
8 changes: 4 additions & 4 deletions packages/sanity/src/core/form/types/inputProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,6 @@ export interface PortableTextInputProps
* A React Ref that can reference the underlying editor instance
*/
editorRef?: React.MutableRefObject<PortableTextEditor | null>
/**
* Open the input in fullscreen mode
*/
fullscreen?: boolean
/**
* Option to hide the default toolbar
*/
Expand All @@ -519,6 +515,10 @@ export interface PortableTextInputProps
* Assign hotkeys that can be attached to custom editing functions
*/
hotkeys?: HotkeyOptions
/**
* Whether the input is _initially_ open in fullscreen mode
*/
initialFullscreen?: boolean
/**
* Array of {@link PortableTextMarker} with meta data connected to the content.
* @deprecated will be removed in the next major version of Sanity Studio.
Expand Down

0 comments on commit 024786c

Please sign in to comment.