diff --git a/platform/ui/src/components/Toolbar/Toolbar.mdx b/platform/ui/src/components/Toolbar/Toolbar.mdx
index 27c1aa54c..f6837e83c 100644
--- a/platform/ui/src/components/Toolbar/Toolbar.mdx
+++ b/platform/ui/src/components/Toolbar/Toolbar.mdx
@@ -7,7 +7,7 @@ route: components/toolbar
import { useState } from 'react';
import { Playground, Props } from 'docz';
import classnames from 'classnames';
-import { Toolbar } from '@ohif/ui';
+import { Toolbar, Typography } from '@ohif/ui';
# Toolbar
@@ -110,9 +110,58 @@ import { Toolbar } from '@ohif/ui';
onClick: () => setActiveTool('Layout 2'),
},
];
+ const secondaryTools = [
+ {
+ id: 'Annotate',
+ label: 'Annotate',
+ icon: 'tool-annotate',
+ type: null,
+ commandName: 'setToolActive',
+ commandOptions: { toolName: 'Annotate' },
+ onClick: () => console.log('Activate Annotate'),
+ },
+ {
+ id: 'Bidirectional',
+ label: 'Bidirectional',
+ icon: 'tool-bidirectional',
+ type: null,
+ commandName: 'setToolActive',
+ commandOptions: { toolName: 'Bidirectional' },
+ onClick: () => console.log('Activate Bidirectional'),
+ },
+ {
+ id: 'Elipse',
+ label: 'Elipse',
+ icon: 'tool-elipse',
+ type: null,
+ commandName: 'setToolActive',
+ commandOptions: { toolName: 'Elipse' },
+ onClick: () => console.log('Activate Elipse'),
+ },
+ {
+ id: 'Length',
+ label: 'Length',
+ icon: 'tool-length',
+ type: null,
+ commandName: 'setToolActive',
+ commandOptions: { toolName: 'Length' },
+ onClick: () => console.log('Activate Length'),
+ },
+ ];
return (
-
-
+
+
+ Primary Toolbar
+
+
+
+ Secondary Toolbar
+
+
);
}}
diff --git a/platform/ui/src/views/ToolbarSecondary/ToolbarSecondary.mdx b/platform/ui/src/views/ToolbarSecondary/ToolbarSecondary.mdx
deleted file mode 100644
index 3f99d593a..000000000
--- a/platform/ui/src/views/ToolbarSecondary/ToolbarSecondary.mdx
+++ /dev/null
@@ -1,112 +0,0 @@
----
-name: Toolbar Secondary
-menu: Views
-route: examples/toolbarSecondary
----
-
-import { useState } from 'react';
-import { Playground } from 'docz';
-import classnames from 'classnames';
-import { Icon, IconButton } from '@ohif/ui';
-
-# Toolbar Secondary
-
-This example shows you how you can build a Toolbar using the available
-components.
-
-## Basic usage
-
-
- {() => {
- const [activeTool, setActiveTool] = useState(null);
- const [showTooltip, setShowTooltip] = useState(null);
- const tools = [
- {
- id: 'Annotate',
- label: 'Annotate',
- icon: 'tool-annotate',
- type: null,
- commandName: 'setToolActive',
- commandOptions: { toolName: 'Annotate' },
- },
- {
- id: 'Bidirectional',
- label: 'Bidirectional',
- icon: 'tool-bidirectional',
- type: null,
- commandName: 'setToolActive',
- commandOptions: { toolName: 'Bidirectional' },
- },
- {
- id: 'Elipse',
- label: 'Elipse',
- icon: 'tool-elipse',
- type: null,
- commandName: 'setToolActive',
- commandOptions: { toolName: 'Elipse' },
- },
- {
- id: 'Length',
- label: 'Length',
- icon: 'tool-length',
- type: null,
- commandName: 'setToolActive',
- commandOptions: { toolName: 'Length' },
- },
- ];
- const renderToolbar = () => {
- return tools.map((tool, i) => {
- const isActive = activeTool === tool.id;
- const shouldShowTooltip = showTooltip === tool.id;
- return (
-
-
{
- setActiveTool(tool.id);
- }}
- onMouseOver={() => setShowTooltip(tool.id)}
- onMouseOut={() => setShowTooltip(null)}
- >
-
-
- {shouldShowTooltip && (
-
- )}
-
- );
- });
- };
- return (
-
- );
- }}
-