Skip to content

Commit c272194

Browse files
committed
test add temp placeholders for section, row one column and basic card
1 parent 28c7460 commit c272194

File tree

4 files changed

+65
-0
lines changed

4 files changed

+65
-0
lines changed

components/Storyblok/SbBasicCard.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { storyblokEditable, type SbBlokData } from '@storyblok/react/rsc';
2+
import { CreateBloks } from '@/components/CreateBloks';
3+
4+
// TODO: This is a placeholder
5+
export type SbBasicCardProps = {
6+
blok: SbBlokData & {
7+
headline?: string;
8+
ctaLink?: SbBlokData[];
9+
};
10+
}
11+
12+
export const SbBasicCard = (props: SbBasicCardProps) => {
13+
return (
14+
<div {...storyblokEditable(props.blok)}>
15+
<h2>{props.blok.headline}</h2>
16+
<CreateBloks blokSection={props.blok.ctaLink} />
17+
</div>
18+
);
19+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { storyblokEditable, type SbBlokData } from '@storyblok/react/rsc';
2+
import { CreateBloks } from '@/components/CreateBloks';
3+
4+
// TODO: This is a placeholder
5+
export type SbRowOneColumnProps = {
6+
blok: SbBlokData & {
7+
columnDontent: SbBlokData[];
8+
};
9+
}
10+
11+
export const SbRowOneColumn = (props: SbRowOneColumnProps) => {
12+
return (
13+
<div {...storyblokEditable(props.blok)}>
14+
<CreateBloks blokSection={props.blok.columnDontent} />
15+
</div>
16+
);
17+
};

components/Storyblok/SbSection.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { storyblokEditable, type SbBlokData } from '@storyblok/react/rsc';
2+
import { Container } from '@/components/Container';
3+
import { CreateBloks } from '@/components/CreateBloks';
4+
5+
// TODO: This is a placeholder
6+
export type SbSectionProps = {
7+
blok: SbBlokData & {
8+
title?: string;
9+
content: SbBlokData[];
10+
};
11+
}
12+
13+
export const SbSection = (props: SbSectionProps) => {
14+
return (
15+
<Container {...storyblokEditable(props.blok)} className="ood-section">
16+
{props.blok.title && (
17+
<h2>{props.blok.title}</h2>
18+
)}
19+
<CreateBloks blokSection={props.blok.content} />
20+
</Container>
21+
);
22+
};

utilities/storyblok.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ import { SbNavItem } from '@/components/Storyblok/SbNavItem';
1818
import { SbLockup } from '@/components/Storyblok/SbLockup';
1919
import { SbSingleColumnContent } from '@/components/Storyblok/SbSingleColumnContent';
2020
import { SbStoryImage } from '@/components/Storyblok/SbStoryImage';
21+
import { SbSection } from '@/components/Storyblok/SbSection';
22+
import { SbRowOneColumn } from '@/components/Storyblok/SbRowOneColumn';
23+
import { SbBasicCard } from '@/components/Storyblok/SbBasicCard';
2124

2225
export const components = {
2326
// TODO DS-1417: Remove and clean up page
@@ -27,6 +30,8 @@ export const components = {
2730
ctaLink: SbCtaLink,
2831
navItem: SbNavItem,
2932
lockup: SbLockup,
33+
// Cards
34+
basicCard: SbBasicCard,
3035
// Pages
3136
oodCampaignPage: SbCampaignPage,
3237
oodInteriorPage: SbInteriorPage,
@@ -40,6 +45,8 @@ export const components = {
4045
localFooterPicker: SbLocalFooterPicker,
4146
oodLocalFooter: SbLocalFooter,
4247
// Layout
48+
rowOneColumn: SbRowOneColumn,
49+
section: SbSection,
4350
singleColumnContent: SbSingleColumnContent,
4451
// Media
4552
storyImage: SbStoryImage,

0 commit comments

Comments
 (0)