mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Editor Redesign Cleanup: main layout, toolbar, and rail (#31031)
* feat: integrate main layout, toolbar, and rail from redesign into main ide-react folder * feat: remove additional files no longer used after ide redesign GitOrigin-RevId: 8fd77f63cb9c67be91995a9dde13b0fe2376d80f
This commit is contained in:
committed by
Copybot
parent
c790449196
commit
fc8d564320
@@ -0,0 +1,19 @@
|
||||
import { AvailableUnfilledIcon } from '@/shared/components/material-icon'
|
||||
import { RailTabKey } from '../context/rail-context'
|
||||
import { FC, ReactElement } from 'react'
|
||||
import RailTab from '@/features/ide-react/components/rail/rail-tab'
|
||||
|
||||
export type CustomRailTabIcon = FC<{ open: boolean; title: string }>
|
||||
|
||||
export type RailElement = {
|
||||
icon: AvailableUnfilledIcon | CustomRailTabIcon
|
||||
key: RailTabKey
|
||||
component: ReactElement | null
|
||||
indicator?: ReactElement
|
||||
title: string
|
||||
hide?: boolean | (() => boolean)
|
||||
disabled?: boolean
|
||||
mountOnFirstLoad?: boolean
|
||||
ref?: React.RefObject<HTMLAnchorElement>
|
||||
tab?: typeof RailTab
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
export function shouldIncludeElement({
|
||||
hide,
|
||||
}: {
|
||||
hide?: boolean | (() => boolean)
|
||||
}): boolean {
|
||||
if (typeof hide === 'function') {
|
||||
return !hide()
|
||||
}
|
||||
return !hide
|
||||
}
|
||||
Reference in New Issue
Block a user