From 02098462f7290486b0186171734a67fdf2d020d4 Mon Sep 17 00:00:00 2001 From: Siddhant Rawal <128523557+siddhantrawal@users.noreply.github.com> Date: Thu, 19 Oct 2023 16:54:58 -0400 Subject: [PATCH 01/15] updating header docs. --- apps/website/src/pages/docs/header.mdx | 22 +++++- examples/Header.center.tsx | 96 ++++++++++++++++++++++++ examples/Header.full.tsx | 100 +++++++++++++++++++++++++ examples/Header.slim.tsx | 82 ++++++++++++++++++++ examples/index.tsx | 12 +++ 5 files changed, 310 insertions(+), 2 deletions(-) create mode 100644 examples/Header.center.tsx create mode 100644 examples/Header.full.tsx create mode 100644 examples/Header.slim.tsx diff --git a/apps/website/src/pages/docs/header.mdx b/apps/website/src/pages/docs/header.mdx index 91153345ca5..ad52e98c4e7 100644 --- a/apps/website/src/pages/docs/header.mdx +++ b/apps/website/src/pages/docs/header.mdx @@ -14,8 +14,6 @@ import * as AllExamples from 'examples';

{frontmatter.description}

- - @@ -26,6 +24,26 @@ The headers seen when in our CONNECT Portal environment. A header sits at the to The CONNECT portal header contains the services menu, home, enterprise, assets and projects links beginning from left to right. From right to left there is the user profile, help, and notification links. +## Types + +### Full Header + + + + + +### Slim Header + + + + + +### Center Content + + + + + Header with circular callouts, numbered from 1 to 8. - Services menu diff --git a/examples/Header.center.tsx b/examples/Header.center.tsx new file mode 100644 index 00000000000..c1449d27660 --- /dev/null +++ b/examples/Header.center.tsx @@ -0,0 +1,96 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Bentley Systems, Incorporated. All rights reserved. + * See LICENSE.md in the project root for license terms and full copyright notice. + *--------------------------------------------------------------------------------------------*/ +import * as React from 'react'; +import { + Avatar, + Header, + HeaderBreadcrumbs, + HeaderButton, + HeaderLogo, + IconButton, + MenuItem, + Input, +} from '@itwin/itwinui-react'; + +export default () => { + const menuItems = (close: () => void) => [ + + Item #1 + , + + Item #2 + , + + Item #3 + , + ]; + + const searchBar = ( + <> + + + + ); + + return ( + + ); +}; diff --git a/examples/Header.full.tsx b/examples/Header.full.tsx new file mode 100644 index 00000000000..7182bf2501a --- /dev/null +++ b/examples/Header.full.tsx @@ -0,0 +1,100 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Bentley Systems, Incorporated. All rights reserved. + * See LICENSE.md in the project root for license terms and full copyright notice. + *--------------------------------------------------------------------------------------------*/ +import React from 'react'; +import { action } from '@storybook/addon-actions'; +import { + DropdownMenu, + getUserColor, + Header, + HeaderBreadcrumbs, + HeaderButton, + HeaderLogo, + IconButton, + MenuItem, + Avatar, +} from '@itwin/itwinui-react'; +import SvgHelpCircularHollow from '@itwin/itwinui-icons-react/cjs/icons/HelpCircularHollow'; +import SvgNotification from '@itwin/itwinui-icons-react/cjs/icons/Notification'; + +export default () => { + const menuItems = (close: () => void) => [ + + Item #1 + , + + Item #2 + , + + Item #3 + , + ]; + + return ( +