+ );
+ });
+ };
+
+ const getMenuCategory = (menuName) => {
+ return Object.keys(MENU_CATEGORIES).find((category) => {
+ if (MENU_CATEGORIES[category].includes(menuName)) {
+ return category;
+ }
+ return null;
+ });
+ };
+
return (
<>
{props.sidebarOpen && (
@@ -56,11 +97,26 @@ export const Sidebar = React.forwardRef((props, ref) => {
onChange={handleChange}
/>
{menus &&
- menus.map(menu => {
- if (!menu.route)
+ menus.map((menu) => {
+ const isGroup = !!menu.menu;
+ const Component = isGroup ? NavGroup : NavLink;
+ const menuCategory = getMenuCategory(menu.name) || null;
+
+ if (menuCategory) {
+ customMenus[menuCategory].push(
+
+ {!isGroup && menu.name}
+
+ );
+ return null;
+ }
+
+ if (!menu.route) {
return (
);
+ }
+
if (menu.route === currentDoc.route) {
return (
@@ -74,6 +130,7 @@ export const Sidebar = React.forwardRef((props, ref) => {
);
})}
+ {renderMenuCategories()}
>
)}
diff --git a/platform/ui/src/gatsby-theme-docz/theme.css b/platform/ui/src/gatsby-theme-docz/theme.css
index 6864e3e8f..a6d6fb193 100644
--- a/platform/ui/src/gatsby-theme-docz/theme.css
+++ b/platform/ui/src/gatsby-theme-docz/theme.css
@@ -4,6 +4,9 @@
[data-testid='live-preview'] {
background: #000;
+}
+
+#main-layout {
@apply font-sans;
}
diff --git a/platform/ui/src/index.mdx b/platform/ui/src/index.mdx
deleted file mode 100644
index cdffa6654..000000000
--- a/platform/ui/src/index.mdx
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: Getting Started
-route: /
----
-
-# Getting Started
-
-Design systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.
-
-Regardless of the technologies and tools behind them, a successful design system follows these guiding principles:
-
-- **It’s consistent**. The way components are built and managed follows a predictable pattern.
-- **It’s self-contained**. Your design system is treated as a standalone dependency.
-- **It’s reusable**. You’ve built components so they can be reused in many contexts.
-- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.
-- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.
-
-## Consistency
-
-Your first, most important task when starting out is to define the rules of your system, document them, and ensure that everyone follows them. When you have clearly documented code standards and best practices in place, designers and developers from across your organization can easily use and, more importantly, contribute to your design system.
diff --git a/platform/ui/src/pages/getting-started.mdx b/platform/ui/src/pages/getting-started.mdx
new file mode 100644
index 000000000..3c38456a0
--- /dev/null
+++ b/platform/ui/src/pages/getting-started.mdx
@@ -0,0 +1,47 @@
+---
+name: Getting Started
+route: /
+---
+
+import { Playground } from 'docz';
+import { Button } from '@ohif/ui';
+
+# Getting Started
+
+`@ohif/ui` is a collection of components and utilities that power OHIF's
+zero-footprint DICOM viewer.
+
+It's maintained in a monorepo, in the
+[OHIF's repository](https://github.com/OHIF/Viewers/).
+
+## Installation
+
+Install `@ohif/ui` from your terminal:
+
+```bash
+// with npm
+npm i @ohif/ui --save-exact
+
+// with yarn
+yarn add @ohif/ui --exact
+```
+
+## Usage
+
+```javascript
+// Import and use components
+import { Button } from '@ohif/ui';
+```
+
+
+
+ alert('Hello!')}>Click here!
+
+
+
+## Examples
+
+In the **Examples** section you can check many examples on how to build your
+application using `@ohif/ui` components.
+
+...
diff --git a/platform/ui/src/views/Colors/Colors.mdx b/platform/ui/src/views/Colors/Colors.mdx
index 5b9f0f790..d12c1c73d 100644
--- a/platform/ui/src/views/Colors/Colors.mdx
+++ b/platform/ui/src/views/Colors/Colors.mdx
@@ -1,6 +1,5 @@
---
name: Colors
-menu: System
route: system/colors
---
@@ -9,9 +8,9 @@ import BackgroundColor from './BackgroundColor';
# Color System
-**@ohif/ui** offers a color system with a handful of color utility classes.
+`@ohif/ui` offers a color system with a handful of color utility classes.
-As **@ohif/ui** uses Tailwind as a base styling library, you will be able to use
+As `@ohif/ui` uses Tailwind as a base styling library, you will be able to use
all the default colors from Tailwind, besides our custom colors too.
# How to use