Skip to content

Commit

Permalink
docs: fix Popover example
Browse files Browse the repository at this point in the history
  • Loading branch information
DSil committed Jan 12, 2024
1 parent f32397a commit 168e55b
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 54 deletions.
61 changes: 35 additions & 26 deletions docs/src/__examples__/Popover/DEFAULT.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,43 @@
import React from "react";
import { Popover, Button, ButtonLink, Stack } from "@kiwicom/orbit-components";
import {
Popover,
Button,
ButtonLink,
Stack,
OrbitProvider,
defaultTheme,
} from "@kiwicom/orbit-components";
import { QuestionCircle } from "@kiwicom/orbit-components/icons";

export default {
Example: () => (
<Popover
renderInPortal={false}
content={
<Stack spacing="small">
<ButtonLink
external
type="secondary"
fullWidth
href="https://orbit.kiwi/components/popover/react/"
>
Reference
</ButtonLink>
<ButtonLink
external
type="secondary"
fullWidth
href="https://orbit.kiwi/components/popover/"
>
Guidelines
</ButtonLink>
</Stack>
}
>
<Button circled title="Help" iconLeft={<QuestionCircle />} />
</Popover>
<OrbitProvider theme={defaultTheme} useId={React.useId}>
<Popover
renderInPortal={false}
content={
<Stack spacing="small">
<ButtonLink
external
type="secondary"
fullWidth
href="https://orbit.kiwi/components/popover/react/"
>
Reference
</ButtonLink>
<ButtonLink
external
type="secondary"
fullWidth
href="https://orbit.kiwi/components/popover/"
>
Guidelines
</ButtonLink>
</Stack>
}
>
<Button circled title="Help" iconLeft={<QuestionCircle />} />
</Popover>
</OrbitProvider>
),
exampleKnobs: [
{
Expand Down
65 changes: 37 additions & 28 deletions docs/src/__examples__/Popover/TRIGGER.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,44 @@
import React from "react";
import { Popover, Button, ButtonLink, Stack } from "@kiwicom/orbit-components";
import {
Popover,
Button,
ButtonLink,
Stack,
OrbitProvider,
defaultTheme,
} from "@kiwicom/orbit-components";
import { ChevronDown } from "@kiwicom/orbit-components/icons";

export default {
Example: () => (
<Popover
renderInPortal={false}
content={
<Stack spacing="small">
<ButtonLink
external
type="secondary"
fullWidth
href="https://orbit.kiwi/components/popover/react/"
>
Reference
</ButtonLink>
<ButtonLink
external
type="secondary"
fullWidth
href="https://orbit.kiwi/components/popover/"
>
Guidelines
</ButtonLink>
</Stack>
}
>
<Button iconRight={<ChevronDown />} type="secondary">
Learn more
</Button>
</Popover>
<OrbitProvider theme={defaultTheme} useId={React.useId}>
<Popover
renderInPortal={false}
content={
<Stack spacing="small">
<ButtonLink
external
type="secondary"
fullWidth
href="https://orbit.kiwi/components/popover/react/"
>
Reference
</ButtonLink>
<ButtonLink
external
type="secondary"
fullWidth
href="https://orbit.kiwi/components/popover/"
>
Guidelines
</ButtonLink>
</Stack>
}
>
<Button iconRight={<ChevronDown />} type="secondary">
Learn more
</Button>
</Popover>
</OrbitProvider>
),
};

0 comments on commit 168e55b

Please sign in to comment.