-
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.
Merge branch '1.x' into feature/nojira--slideshow
- Loading branch information
Showing
79 changed files
with
2,096 additions
and
1,059 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,48 @@ | ||
import type {Meta, StoryObj} from '@storybook/react'; | ||
import Accordion from "@components/elements/accordion"; | ||
|
||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction | ||
const meta: Meta<typeof Accordion> = { | ||
title: 'Design/Elements/Accordion', | ||
component: Accordion, | ||
tags: ['autodocs'], | ||
argTypes: { | ||
button: { | ||
control: "text" | ||
}, | ||
onClick: { | ||
table: { | ||
disable: true, | ||
} | ||
}, | ||
buttonProps: { | ||
table: { | ||
disable: true, | ||
} | ||
}, | ||
panelProps: { | ||
table: { | ||
disable: true, | ||
} | ||
}, | ||
isVisible: { | ||
table: { | ||
disable: true, | ||
} | ||
} | ||
} | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof Accordion>; | ||
|
||
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args | ||
export const AccordionElement: Story = { | ||
render: ({onClick, ...args}) => { | ||
return <Accordion {...args}/> | ||
}, | ||
args: { | ||
button: "Id arcu nec vel tempus rutrum.", | ||
children: "Mi amet tempus congue erat fusce euismod eros cursus morbi amet amet diam tristique bibendum hendrerit sed commodo quisque cursus scelerisque morbi placerat tristique magna." | ||
}, | ||
}; |
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 was deleted.
Oops, something went wrong.
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
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,25 @@ | ||
import NodePage from "@components/nodes/pages/node-page"; | ||
import UnpublishedBanner from "@components/elements/unpublished-banner"; | ||
import {NodeUnion} from "@lib/gql/__generated__/drupal.d"; | ||
import {getEntityFromPath} from "@lib/gql/gql-queries"; | ||
import {notFound} from "next/navigation"; | ||
import {getPathFromContext, isPreviewMode, PageProps} from "@lib/drupal/utils"; | ||
|
||
const PreviewPage = async ({params}: PageProps) => { | ||
if (!isPreviewMode()) notFound(); | ||
const { entity, error} = await getEntityFromPath<NodeUnion>(getPathFromContext({params}), true) | ||
|
||
if (error) throw new Error(error); | ||
if (!entity) notFound(); | ||
|
||
return ( | ||
<> | ||
<UnpublishedBanner status={entity.status}> | ||
Unpublished Page | ||
</UnpublishedBanner> | ||
<NodePage node={entity}/> | ||
</> | ||
) | ||
} | ||
|
||
export default PreviewPage; |
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,21 @@ | ||
import {isPreviewMode} from "@lib/drupal/utils"; | ||
import Editori11y from "@components/tools/editorially"; | ||
import UnpublishedBanner from "@components/elements/unpublished-banner"; | ||
|
||
const Layout = ({children}: { children: React.ReactNode }) => { | ||
const inPreview = isPreviewMode(); | ||
return ( | ||
<> | ||
{inPreview && | ||
<> | ||
<Editori11y/> | ||
<UnpublishedBanner status={false}> | ||
Preview Mode | ||
</UnpublishedBanner> | ||
</> | ||
} | ||
{children} | ||
</> | ||
) | ||
} | ||
export default Layout; |
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,10 @@ | ||
import {notFound} from "next/navigation"; | ||
import {isPreviewMode} from "@lib/drupal/utils"; | ||
import Page from "../page"; | ||
|
||
const PreviewPage = async () => { | ||
if (!isPreviewMode()) notFound(); | ||
return <Page/> | ||
} | ||
|
||
export default PreviewPage; |
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
Oops, something went wrong.