-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace minimap with suiteSelector component (#383)
Co-authored-by: mparticle-automation <[email protected]>
- Loading branch information
1 parent
b2baa7e
commit 2ab27ca
Showing
15 changed files
with
338 additions
and
698 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Publish Storybook | |
on: | ||
push: | ||
branches: | ||
- "main" # change to the branch you wish to deploy from | ||
- 'main' # change to the branch you wish to deploy from | ||
|
||
permissions: | ||
contents: read | ||
|
@@ -14,7 +14,7 @@ jobs: | |
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: build-publish | ||
uses: bitovi/[email protected] | ||
with: | ||
path: storybook-static | ||
- id: build-publish | ||
uses: bitovi/[email protected] | ||
with: | ||
path: storybook-static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/components/navigation/GlobalNavigation/SuiteSelector/SuiteSelector.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React, { type ReactNode } from 'react' | ||
import { type IPopoverProps, Popover } from 'src/components' | ||
import { | ||
type ISuiteSelectorOptions, | ||
type SuiteLink, | ||
} from 'src/components/navigation/GlobalNavigation/GlobalNavigationItems' | ||
import { SuiteSelectorContent } from 'src/components/navigation/GlobalNavigation/SuiteSelector/SuiteSelectorContent' | ||
|
||
interface ISuiteSelectorProps extends IPopoverProps { | ||
suiteSelectorOptions: ISuiteSelectorOptions | ||
onLinkClick: (link: SuiteLink) => void | ||
children: ReactNode | ||
} | ||
|
||
export function SuiteSelector(props: ISuiteSelectorProps) { | ||
return ( | ||
<Popover | ||
content={ | ||
<SuiteSelectorContent | ||
overviewHref={props.suiteSelectorOptions.overviewHref} | ||
onUnauthorizedClick={props.suiteSelectorOptions.onUnauthorizedClick} | ||
links={props.suiteSelectorOptions.links} | ||
onLinkClick={props.onLinkClick} | ||
unauthorizedLinks={props.suiteSelectorOptions.unauthorizedLinks} | ||
activeLink={props.suiteSelectorOptions.activeLink} | ||
/> | ||
} | ||
placement="bottomLeft" | ||
open={props.open} | ||
trigger="click" | ||
onOpenChange={props.onOpenChange} | ||
arrow={false}> | ||
{props.children} | ||
</Popover> | ||
) | ||
} |
Oops, something went wrong.