REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.23 KB
Close
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/src/frontend/hoc/allow-override.tsx
Text
Base64
/* eslint-disable react/function-component-definition */ import React, { ComponentType } from 'react' import { OverridableComponent } from '../utils/overridable-component.js' /** * @private * * @classdesc * Overrides one of the AdminJS core components when user passes it's name to ComponentLoader * * If case of being overridden, component receives additional prop: `OriginalComponent` * * @example * new ComponentLoader().override('SidebarFooter', MySidebarFooter) */ function allowOverride<P extends Record<string, unknown>>( OriginalComponent: ComponentType<P>, name: OverridableComponent, ): ComponentType<P & {OriginalComponent?: ComponentType<P>}> { const WrapperComponent = (props: P) => { let Component = OriginalComponent /** * @new in version 6.3 * * This adds support for future theme-specific components via their "theme.bundle.js" * */ if (typeof window !== 'undefined') { Component = (window as any).AdminJS?.UserComponents?.[name] ?? (window as any).THEME_COMPONENTS?.[name] ?? OriginalComponent } return <Component {...props} OriginalComponent={OriginalComponent} /> } return WrapperComponent } export { allowOverride as default, allowOverride, }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
allow-override.tsx
1.23 KB
lrw-r--r--
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.ts
102 B
lrw-r--r--
2026-02-28 00:32:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
with-no-ssr.tsx
992 B
lrw-r--r--
2026-02-28 00:32:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
with-notice.ts
1.28 KB
lrw-r--r--
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).