Merge branch 'master' of https://github.com/mathuo/dockview into 100-docs

This commit is contained in:
mathuo 2022-05-29 17:50:19 +01:00
commit 28f77ac3ae
No known key found for this signature in database
GPG Key ID: C6EEDEFD6CA07281
2 changed files with 29 additions and 1 deletions

View File

@ -12,7 +12,7 @@ console.log(`isCI: ${process.env.CI}`);
const config = { const config = {
title: 'Dockview', title: 'Dockview',
tagline: 'Zero dependency layout manager for React', tagline: 'Zero dependency layout manager for React',
url: 'https://your-docusaurus-test-site.com', url: 'https://dockview.dev',
baseUrl: process.env.CI ? `/` : '/', baseUrl: process.env.CI ? `/` : '/',
onBrokenLinks: 'throw', onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn', onBrokenMarkdownLinks: 'warn',
@ -87,6 +87,28 @@ const config = {
themeConfig: themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({ ({
metadata: [
{
name: 'keywords',
content: [
'react',
'components',
'typescript',
'drag-and-drop',
'reactjs',
'layout',
'drag',
'drop',
'tabs',
'dock',
'docking',
'splitter',
'docking-library',
'layout-manager',
'docking-layout',
].join(' ,'),
},
],
navbar: { navbar: {
title: 'Dockview', title: 'Dockview',
logo: { logo: {

View File

@ -98,12 +98,18 @@ export const ContextMenuDockview = () => {
}); });
}; };
const onContextMenu = (event: TabContextMenuEvent) => {
event.event.preventDefault();
alert(`Content appear event fired for panel ${event.panel.id}`);
};
return ( return (
<DockviewReact <DockviewReact
components={components} components={components}
tabComponents={tabComponents} tabComponents={tabComponents}
onReady={onReady} onReady={onReady}
className="dockview-theme-dark" className="dockview-theme-dark"
onTabContextMenu={onContextMenu}
/> />
); );
}; };