Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Sarka/playroom snippets #4583

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions packages/orbit-components/playroom/snippets/BasicComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,82 @@ const dialog = `

const heading = `<Heading as="h1" type="title1">Heading</Heading>`;

const linkList = `
<LinkList>
<TextLink type="secondary">
Flight 1
</TextLink>
<TextLink type="secondary">
Flight 2
</TextLink>
<TextLink type="secondary">
Flight 3
</TextLink>
</LinkList>
`;

const list = `
<List>
<ListItem>
24,000 locations around the globe
</ListItem>
<ListItem>
Lowest price car rental in Warsaw
</ListItem>
<ListItem>
From 3 star budget to 5 star luxury
</ListItem>
</List>
`;

const listChoice = `
<>
<ListChoice
title="Choice Title"
description="Further description"
icon={<Icons.Accommodation />}
selectable
/>
<ListChoice
title="Choice Title"
description="Further description"
icon={<Icons.Accommodation />}
selectable
/>
</>
`;

const loading = `<Loading loading text="Please wait, content is loading..." type="pageLoader" />`;

const notificationBadge = `<NotificationBadge type="info">10</NotificationBadge>`;

const pagination = `
<Pagination
labelProgress="Numbers of pages: 6"
pageCount={6}
/>
`;

const popover = `
<Popover
content={
<Stack>
<Text>Lorem ipsum</Text>
</Stack>
}
>
<Button
iconRight={<Icons.ChevronDown />}
>
Open popover
</Button>
</Popover>
`;

const radio = `<Radio label="Label" name="Name" value="value" />`;

const seat = `<Seat label="XY" type="default" />`;

export default [
{
group: "Alert",
Expand Down Expand Up @@ -107,4 +183,40 @@ export default [
group: "Heading",
code: heading,
},
{
group: "LinkList",
code: linkList,
},
{
group: "List",
code: list,
},
{
group: "ListChoice",
code: listChoice,
},
{
group: "Loading",
code: loading,
},
{
group: "NotificationBadge",
code: notificationBadge,
},
{
group: "Pagination",
code: pagination,
},
{
group: "Popover",
code: popover,
},
{
group: "Radio",
code: radio,
},
{
group: "Seat",
code: seat,
},
];
34 changes: 34 additions & 0 deletions packages/orbit-components/playroom/snippets/Layouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,36 @@ const modal = `
</Modal>
`;

const navigationBar = `<NavigationBar>
<Stack
justify="between"
spacing="none"
>
<ButtonLink
iconRight={<Icons.ChevronDown />}
type="secondary"
>
Flights
</ButtonLink>
<Stack
direction="row"
justify="end"
shrink
spacing="100"
>
<ButtonLink
iconLeft={<Icons.StarFull />}
type="secondary"
/>
<ButtonLink
iconLeft={<Icons.AccountCircle />}
type="secondary"
/>
</Stack>
</Stack>
</NavigationBar>
`;

export default [
{
group: "CalloutBanner",
Expand All @@ -344,4 +374,8 @@ export default [
group: "Modal",
code: modal,
},
{
group: "NavigationBar",
code: navigationBar,
},
];
Loading