1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 18:30:53 +00:00

fix: sdoc detail style (#6709)

* fix: sdoc detail style

* feat: update code

* feat: style

* feat: restore code

* feat: restore code

* feat: delete

* feat: rstore code

* feat: rstore code

---------

Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
杨国璇
2024-09-05 13:35:58 +08:00
committed by GitHub
parent 8a61cbd784
commit dd907e14ed
6 changed files with 55 additions and 11 deletions

View File

@@ -10,8 +10,8 @@ import { MetadataContext } from '../../../metadata';
import './index.css';
const EmbeddedFileDetails = ({ repoID, repoInfo, dirent, path, onClose, width = 300, className }) => {
const EmbeddedFileDetails = ({ repoID, repoInfo, dirent, path, onClose, width = 300, className, component }) => {
const { headerComponent } = component;
const [direntDetail, setDirentDetail] = useState('');
useEffect(() => {
@@ -44,7 +44,7 @@ const EmbeddedFileDetails = ({ repoID, repoInfo, dirent, path, onClose, width =
})}
style={{ width }}
>
<Header title={direntName} icon={smallIconUrl} onClose={onClose} />
<Header title={direntName} icon={smallIconUrl} onClose={onClose} component={headerComponent} />
<Body>
{dirent && direntDetail && (
<div className="detail-content">
@@ -66,6 +66,7 @@ EmbeddedFileDetails.propTypes = {
dirent: PropTypes.object,
path: PropTypes.string.isRequired,
repoInfo: PropTypes.object.isRequired,
component: PropTypes.object,
onClose: PropTypes.func.isRequired,
};