Skip to content

Commit

Permalink
fix(layout): add v5 to layout
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Apr 21, 2024
1 parent b28b2fd commit 9504370
Show file tree
Hide file tree
Showing 130 changed files with 75 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const preview: Preview = {
options: {
storySort: {
order: [
"Layout",
"Layout v5",
[
"Introduction",
"Installation",
Expand Down
6 changes: 2 additions & 4 deletions blocks/layout-app-analytics/LayoutAppAnalytics.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from "react";
import type { Meta, StoryObj } from "@storybook/react";
import googleFont from "../../.storybook/decorators/googleFont";
import storyDialog from "../../.storybook/decorators/storyDialog";
import Usage from "./usage.mdx";
import { LayoutAppAnalytics } from "./index";
import Usage from "./usage.mdx";

const meta = {
title: "Layout/App/Analytics",
title: "Layout v5/App/Analytics",
component: LayoutAppAnalytics,
parameters: {
layout: "fullscreen",
Expand All @@ -21,5 +21,3 @@ type Story = StoryObj<typeof meta>;
export const Analytics: Story = {
render: () => <LayoutAppAnalytics />,
};


2 changes: 1 addition & 1 deletion blocks/layout-app-analytics/LayoutAppAnalytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
Root,
SidebarContent,
Subheader,
} from "../layout-core";
} from "../layout-core-v5";
import {
IconNavMockup,
LinkNavMockup,
Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-app-analytics/usage.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Source } from "@storybook/blocks";
import raw from "./LayoutAppAnalytics?raw";

<Meta title="Layout/App/Analytics" />
<Meta title="Layout v5/App/Analytics" />

## CLI

Expand Down
6 changes: 2 additions & 4 deletions blocks/layout-app-messenger/LayoutAppMessenger.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from "react";
import type { Meta, StoryObj } from "@storybook/react";
import googleFont from "../../.storybook/decorators/googleFont";
import storyDialog from "../../.storybook/decorators/storyDialog";
import Usage from "./usage.mdx";
import { LayoutAppMessenger } from "./index";
import Usage from "./usage.mdx";

const meta = {
title: "Layout/App/Messenger",
title: "Layout v5/App/Messenger",
component: LayoutAppMessenger,
parameters: {
layout: "fullscreen",
Expand All @@ -21,5 +21,3 @@ type Story = StoryObj<typeof meta>;
export const Messenger: Story = {
render: () => <LayoutAppMessenger />,
};


2 changes: 1 addition & 1 deletion blocks/layout-app-messenger/LayoutAppMessenger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
InsetContainer,
InsetSidebar,
Root,
} from "../layout-core";
} from "../layout-core-v5";
import {
ChatBar,
ChatDialog,
Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-app-messenger/usage.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Source } from "@storybook/blocks";
import raw from "./LayoutAppMessenger?raw";

<Meta title="Layout/App/Messenger" />
<Meta title="Layout v5/App/Messenger" />

## CLI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from "react";
import type { Meta, StoryObj } from "@storybook/react";
import googleFont from "../../.storybook/decorators/googleFont";
import storyDialog from "../../.storybook/decorators/storyDialog";
import Usage from "./usage.mdx";
import { LayoutAppReactLegacy } from "./index";
import Usage from "./usage.mdx";

const meta = {
title: "Layout/App/ReactLegacy",
title: "Layout v5/App/ReactLegacy",
component: LayoutAppReactLegacy,
parameters: {
layout: "fullscreen",
Expand All @@ -21,5 +21,3 @@ type Story = StoryObj<typeof meta>;
export const ReactLegacy: Story = {
render: () => <LayoutAppReactLegacy />,
};


2 changes: 1 addition & 1 deletion blocks/layout-app-reactLegacy/LayoutAppReactLegacy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
InsetContainer,
InsetSidebar,
Root,
} from "../layout-core";
} from "../layout-core-v5";
// @ts-ignore
import { ReactContent, ReactHeader, ReactNextArticle } from "./components";

Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-app-reactLegacy/usage.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Source } from "@storybook/blocks";
import raw from "./LayoutAppReactLegacy?raw";

<Meta title="Layout/App/ReactLegacy" />
<Meta title="Layout v5/App/ReactLegacy" />

## CLI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from "react";
import type { Meta, StoryObj } from "@storybook/react";
import googleFont from "../../.storybook/decorators/googleFont";
import storyDialog from "../../.storybook/decorators/storyDialog";
import Usage from "./usage.mdx";
import { LayoutAppShoppingCart } from "./index";
import Usage from "./usage.mdx";

const meta = {
title: "Layout/App/ShoppingCart",
title: "Layout v5/App/ShoppingCart",
component: LayoutAppShoppingCart,
parameters: {
layout: "fullscreen",
Expand All @@ -21,5 +21,3 @@ type Story = StoryObj<typeof meta>;
export const ShoppingCart: Story = {
render: () => <LayoutAppShoppingCart />,
};


2 changes: 1 addition & 1 deletion blocks/layout-app-shoppingCart/LayoutAppShoppingCart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
InsetContainer,
InsetSidebar,
Root,
} from "../layout-core";
} from "../layout-core-v5";
import {
DailyCart,
DailyCheckout,
Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-app-shoppingCart/usage.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Source } from "@storybook/blocks";
import raw from "./LayoutAppShoppingCart?raw";

<Meta title="Layout/App/ShoppingCart" />
<Meta title="Layout v5/App/ShoppingCart" />

## CLI

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { LayoutExampleControlEdgeSidebar } from "./index";
import Usage from "./usage.mdx";

const meta = {
title: "Layout/Example/ControlEdgeSidebar",
title: "Layout v5/Example/ControlEdgeSidebar",
component: LayoutExampleControlEdgeSidebar,
parameters: {
layout: "fullscreen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
Root,
SidebarContent,
useLayoutCtx,
} from "../layout-core";
} from "../layout-core-v5";

const TriggerUsingHook = () => {
const {
Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-example-controlEdgeSidebar/usage.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Source } from "@storybook/blocks";
import raw from "./LayoutExampleControlEdgeSidebar?raw";

<Meta title="Layout/Example/ControlEdgeSidebar" />
<Meta title="Layout v5/Example/ControlEdgeSidebar" />

## CLI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { LayoutExampleGlobalTheme } from "./index";
import Usage from "./usage.mdx";

const meta = {
title: "Layout/Example/GlobalTheme",
title: "Layout v5/Example/GlobalTheme",
component: LayoutExampleGlobalTheme,
parameters: {
layout: "fullscreen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
InsetSidebar,
Root,
SidebarContent,
} from "../layout-core";
} from "../layout-core-v5";

// https://github.com/tailwindlabs/tailwindcss/blob/master/colors.js#L244
const coolGray = {
Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-example-globalTheme/usage.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Source } from "@storybook/blocks";
import raw from "./LayoutExampleGlobalTheme?raw";

<Meta title="Layout/Example/GlobalTheme" />
<Meta title="Layout v5/Example/GlobalTheme" />

## CLI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from "react";
import type { Meta, StoryObj } from "@storybook/react";
import googleFont from "../../.storybook/decorators/googleFont";
import storyDialog from "../../.storybook/decorators/storyDialog";
import Usage from "./usage.mdx";
import { LayoutExampleInsetSidebarPosition } from "./index";
import Usage from "./usage.mdx";

const meta = {
title: "Layout/Example/InsetSidebarPosition",
title: "Layout v5/Example/InsetSidebarPosition",
component: LayoutExampleInsetSidebarPosition,
parameters: {
layout: "fullscreen",
Expand All @@ -21,5 +21,3 @@ type Story = StoryObj<typeof meta>;
export const InsetSidebarPosition: Story = {
render: () => <LayoutExampleInsetSidebarPosition />,
};


Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
InsetContainer,
InsetSidebar,
Root,
} from "../layout-core";
} from "../layout-core-v5";

const theme = createTheme();

Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-example-insetSidebarPosition/usage.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Source } from "@storybook/blocks";
import raw from "./LayoutExampleInsetSidebarPosition?raw";

<Meta title="Layout/Example/InsetSidebarPosition" />
<Meta title="Layout v5/Example/InsetSidebarPosition" />

## CLI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from "react";
import type { Meta, StoryObj } from "@storybook/react";
import googleFont from "../../.storybook/decorators/googleFont";
import storyDialog from "../../.storybook/decorators/storyDialog";
import Usage from "./usage.mdx";
import { LayoutExampleMultipleHeaders } from "./index";
import Usage from "./usage.mdx";

const meta = {
title: "Layout/Example/MultipleHeaders",
title: "Layout v5/Example/MultipleHeaders",
component: LayoutExampleMultipleHeaders,
parameters: {
layout: "fullscreen",
Expand All @@ -21,5 +21,3 @@ type Story = StoryObj<typeof meta>;
export const MultipleHeaders: Story = {
render: () => <LayoutExampleMultipleHeaders />,
};


Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
SidebarContent,
Subheader,
TopHeader,
} from "../layout-core";
} from "../layout-core-v5";

export const LayoutExampleMultipleHeaders = () => {
const [topHidden, setTopHidden] = React.useState(false);
Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-example-multipleHeaders/usage.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Source } from "@storybook/blocks";
import raw from "./LayoutExampleMultipleHeaders?raw";

<Meta title="Layout/Example/MultipleHeaders" />
<Meta title="Layout v5/Example/MultipleHeaders" />

## CLI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from "react";
import type { Meta, StoryObj } from "@storybook/react";
import googleFont from "../../.storybook/decorators/googleFont";
import storyDialog from "../../.storybook/decorators/storyDialog";
import Usage from "./usage.mdx";
import { LayoutExampleRightEdgeSidebar } from "./index";
import Usage from "./usage.mdx";

const meta = {
title: "Layout/Example/RightEdgeSidebar",
title: "Layout v5/Example/RightEdgeSidebar",
component: LayoutExampleRightEdgeSidebar,
parameters: {
layout: "fullscreen",
Expand All @@ -21,5 +21,3 @@ type Story = StoryObj<typeof meta>;
export const RightEdgeSidebar: Story = {
render: () => <LayoutExampleRightEdgeSidebar />,
};


Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Header,
Root,
SidebarContent,
} from "../layout-core";
} from "../layout-core-v5";

export const LayoutExampleRightEdgeSidebar = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-example-rightEdgeSidebar/usage.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Source } from "@storybook/blocks";
import raw from "./LayoutExampleRightEdgeSidebar?raw";

<Meta title="Layout/Example/RightEdgeSidebar" />
<Meta title="Layout v5/Example/RightEdgeSidebar" />

## CLI

Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-example-rtl/LayoutExampleRtl.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { LayoutExampleRtl } from "./index";
import Usage from "./usage.mdx";

const meta = {
title: "Layout/Example/Right-to-Left",
title: "Layout v5/Example/Right-to-Left",
component: LayoutExampleRtl,
parameters: {
layout: "fullscreen",
Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-example-rtl/LayoutExampleRtl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
InsetSidebar,
Root,
SidebarContent,
} from "../layout-core";
} from "../layout-core-v5";

// Create rtl cache
const cacheRtl = createCache({
Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-example-rtl/usage.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Source } from "@storybook/blocks";
import raw from "./LayoutExampleRtl?raw";

<Meta title="Layout/Example/Right-to-Left" />
<Meta title="Layout v5/Example/Right-to-Left" />

## CLI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { LayoutPresetContentBased } from "./index";
import Usage from "./usage.mdx";

const meta = {
title: "Layout/Preset/ContentBased",
title: "Layout v5/Preset/ContentBased",
component: LayoutPresetContentBased,
parameters: {
layout: "fullscreen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Header,
Root,
SidebarContent,
} from "../layout-core";
} from "../layout-core-v5";
import {
ContentMockup,
FooterMockup,
Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-preset-contentBased/usage.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Source } from "@storybook/blocks";
import raw from "./LayoutPresetContentBased?raw";

<Meta title="Layout/Preset/ContentBased" />
<Meta title="Layout v5/Preset/ContentBased" />

## CLI

Expand Down
2 changes: 1 addition & 1 deletion blocks/layout-preset-cozy/LayoutPresetCozy.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { LayoutPresetCozy } from "./index";
import Usage from "./usage.mdx";

const meta = {
title: "Layout/Preset/Cozy",
title: "Layout v5/Preset/Cozy",
component: LayoutPresetCozy,
parameters: {
layout: "fullscreen",
Expand Down

0 comments on commit 9504370

Please sign in to comment.