-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46b9052
commit b8b962a
Showing
10 changed files
with
88 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<style> | ||
html, | ||
body, | ||
#storybook-root { | ||
height: 100%; | ||
margin: 0; | ||
} | ||
</style> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Auto-generated file. Do not modify manually. | ||
export * from "./layout"; | ||
export * from "./logo"; | ||
export * from "./page"; |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.mykn-container { | ||
margin: 0 auto; | ||
max-width: min(1240px, calc(100% - 40px)); | ||
max-width: 1240px; | ||
width: 100%; | ||
} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./page"; |
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,9 @@ | ||
@import "../../settings/style"; | ||
|
||
.mykn-page { | ||
background-color: var(--theme-color-primary-200); | ||
box-sizing: border-box; | ||
width: 100%; | ||
height: 100%; | ||
padding: 50px 20px; | ||
} |
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,42 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import React from "react"; | ||
|
||
import { Container, Grid } from "../layout"; | ||
import { Column } from "../layout/column"; | ||
import { Logo } from "../logo"; | ||
import { Page } from "./page"; | ||
|
||
const meta = { | ||
title: "Building Blocks/Page", | ||
component: Page, | ||
parameters: { | ||
layout: "fullscreen", | ||
}, | ||
} satisfies Meta<typeof Page>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const PageComponent: Story = { | ||
args: { | ||
children: "The quick brown fox jumps over the lazy dog.", | ||
}, | ||
}; | ||
|
||
export const SamplePage: Story = { | ||
args: { | ||
children: ( | ||
<Container> | ||
<Grid> | ||
<Column span={12}> | ||
<Logo | ||
href="/?path=/story/building-blocks-page--sample-page" | ||
hrefLabel="Navigate to story page" | ||
label="Maykin" | ||
/> | ||
</Column> | ||
</Grid> | ||
</Container> | ||
), | ||
}, | ||
}; |
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,19 @@ | ||
import React from "react"; | ||
|
||
import "./page.scss"; | ||
|
||
export type PageProps = React.PropsWithChildren<{ | ||
// Props here. | ||
}>; | ||
|
||
/** | ||
* Provides the base theme for a page. | ||
* @param children | ||
* @param props | ||
* @constructor | ||
*/ | ||
export const Page: React.FC<PageProps> = ({ children, ...props }) => ( | ||
<div className="mykn-page" {...props}> | ||
{children} | ||
</div> | ||
); |
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