Skip to content

Commit

Permalink
Merge pull request #1235 from gsoft-inc/feature/banner-redirect
Browse files Browse the repository at this point in the history
added banner to redirect to Orbiter when suitable
  • Loading branch information
fraincs authored Oct 25, 2023
2 parents 30630e3 + 1a663d1 commit 7fcff3f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .storybook/components/banner/Banner.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.o-ui-sb-banner {
background: var(--o-ui-bg-alias-warning-light);
border-radius: var(--o-ui-br-3);
}
19 changes: 19 additions & 0 deletions .storybook/components/banner/Banner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import "./Banner.css";

import { Div, DivProps } from "@components/html";
import { mergeProps } from "@components/shared";

export function Banner({ children, ...rest }: DivProps) {
return (
<Div
{...mergeProps(
rest,
{
className: "highlight o-ui-sb-banner"
}
)}
>
{children}
</Div>
);
}
1 change: 1 addition & 0 deletions .storybook/components/banner/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./Banner";
1 change: 1 addition & 0 deletions .storybook/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export * from "./snippet";
export * from "./themed-snippet";
export * from "./package-installation-snippet";
export * from "./preview";
export * from "./banner";
4 changes: 3 additions & 1 deletion docs/getting-started/Installation.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta } from "@storybook/addon-docs";
import { PackageInstallationSnippet } from "@stories/components";
import { PackageInstallationSnippet, Banner, ExternalLink } from "@stories/components";
import { Message } from "@components/message";

<Meta
Expand All @@ -9,6 +9,8 @@ import { Message } from "@components/message";

# Installation

<Banner>If you are starting a new project with Workleap, you should use <ExternalLink href="https://wl-orbiter-website.netlify.app/">Orbiter</ExternalLink>.</Banner>

Multiple [NPM packages](https://www.npmjs.com/settings/orbit-ui/packages) compose Orbit. By creating a bundle package named [@sharegate/orbit-ui](https://www.npmjs.com/package/@sharegate/orbit-ui), we simplify the installation process and allow you to install Orbit with just a single package.

> We assume you've already set up [react](https://www.npmjs.com/package/react) and [react-dom](https://www.npmjs.com/package/react-dom). Otherwise, you'll get a warning at installation.
Expand Down

0 comments on commit 7fcff3f

Please sign in to comment.