diff --git a/packages/react-core/src/components/JumpLinks/examples/JumpLinks.md b/packages/react-core/src/components/JumpLinks/examples/JumpLinks.md index 4074b0c67d1..b0ceedcc9a0 100644 --- a/packages/react-core/src/components/JumpLinks/examples/JumpLinks.md +++ b/packages/react-core/src/components/JumpLinks/examples/JumpLinks.md @@ -9,89 +9,26 @@ propComponents: ['JumpLinks', 'JumpLinksItem'] These examples are static because they have no element to scroll spy on that makes sense. Check out the [React demos](./react-demos) to see scroll spying in action! ### Basic -```js -import React from 'react'; -import { JumpLinks, JumpLinksItem } from '@patternfly/react-core'; - - - Inactive section - Active section - Inactive section - +```ts file='./JumpLinksBasic.tsx' ``` ### With centered list -```js -import React from 'react'; -import { JumpLinks, JumpLinksItem } from '@patternfly/react-core'; - - - Inactive section - Active section - Inactive section - +```ts file='./JumpLinksWithCenteredList.tsx' ``` ### With label -```js -import React from 'react'; -import { JumpLinks, JumpLinksItem } from '@patternfly/react-core'; - - - - Inactive section - Active section - Inactive section - - - Inactive section - Active section - Inactive section - - +```ts file='./JumpLinksWithLabel.tsx' ``` ### Vertical -```js -import React from 'react'; -import { JumpLinks, JumpLinksItem } from '@patternfly/react-core'; - - - Inactive section - Active section - Inactive section - +```ts file='./JumpLinksVertical.tsx' ``` ### Vertical with label -```js -import React from 'react'; -import { JumpLinks, JumpLinksItem } from '@patternfly/react-core'; - - - Inactive section - Active section - Inactive section - +```ts file='./JumpLinksVerticalWithLabel.tsx' ``` ### Expandable vertical with subsection -```js -import React from 'react'; -import { JumpLinks, JumpLinksItem, JumpLinksList } from '@patternfly/react-core'; - - - Inactive section - - Section with active subsection - - Active subsection - Inactive subsection - Inactive subsection - - - Inactive section - Inactive section - +```ts file='./JumpLinksExpandableVerticalWithSubsection.tsx' ``` diff --git a/packages/react-core/src/components/JumpLinks/examples/JumpLinksBasic.tsx b/packages/react-core/src/components/JumpLinks/examples/JumpLinksBasic.tsx new file mode 100644 index 00000000000..c638b4efb25 --- /dev/null +++ b/packages/react-core/src/components/JumpLinks/examples/JumpLinksBasic.tsx @@ -0,0 +1,10 @@ +import React from 'react'; +import { JumpLinks, JumpLinksItem } from '@patternfly/react-core'; + +export const JumpLinksBasic: React.FunctionComponent = () => ( + + Inactive section + Active section + Inactive section + +); diff --git a/packages/react-core/src/components/JumpLinks/examples/JumpLinksExpandableVerticalWithSubsection.tsx b/packages/react-core/src/components/JumpLinks/examples/JumpLinksExpandableVerticalWithSubsection.tsx new file mode 100644 index 00000000000..40b45fd46dd --- /dev/null +++ b/packages/react-core/src/components/JumpLinks/examples/JumpLinksExpandableVerticalWithSubsection.tsx @@ -0,0 +1,18 @@ +import React from 'react'; +import { JumpLinks, JumpLinksItem, JumpLinksList } from '@patternfly/react-core'; + +export const JumpLinksExpandableVerticalWithSubsection: React.FunctionComponent = () => ( + + Inactive section + + Section with active subsection + + Active subsection + Inactive subsection + Inactive subsection + + + Inactive section + Inactive section + +); diff --git a/packages/react-core/src/components/JumpLinks/examples/JumpLinksVertical.tsx b/packages/react-core/src/components/JumpLinks/examples/JumpLinksVertical.tsx new file mode 100644 index 00000000000..a087d74cab3 --- /dev/null +++ b/packages/react-core/src/components/JumpLinks/examples/JumpLinksVertical.tsx @@ -0,0 +1,10 @@ +import React from 'react'; +import { JumpLinks, JumpLinksItem } from '@patternfly/react-core'; + +export const JumpLinksVertical: React.FunctionComponent = () => ( + + Inactive section + Active section + Inactive section + +); diff --git a/packages/react-core/src/components/JumpLinks/examples/JumpLinksVerticalWithLabel.tsx b/packages/react-core/src/components/JumpLinks/examples/JumpLinksVerticalWithLabel.tsx new file mode 100644 index 00000000000..0fafa87c303 --- /dev/null +++ b/packages/react-core/src/components/JumpLinks/examples/JumpLinksVerticalWithLabel.tsx @@ -0,0 +1,10 @@ +import React from 'react'; +import { JumpLinks, JumpLinksItem } from '@patternfly/react-core'; + +export const JumpLinksVerticalWithLabel: React.FunctionComponent = () => ( + + Inactive section + Active section + Inactive section + +); diff --git a/packages/react-core/src/components/JumpLinks/examples/JumpLinksWithCenteredList.tsx b/packages/react-core/src/components/JumpLinks/examples/JumpLinksWithCenteredList.tsx new file mode 100644 index 00000000000..d317775f2de --- /dev/null +++ b/packages/react-core/src/components/JumpLinks/examples/JumpLinksWithCenteredList.tsx @@ -0,0 +1,10 @@ +import React from 'react'; +import { JumpLinks, JumpLinksItem } from '@patternfly/react-core'; + +export const JumpLinksWithCenteredList: React.FunctionComponent = () => ( + + Inactive section + Active section + Inactive section + +); diff --git a/packages/react-core/src/components/JumpLinks/examples/JumpLinksWithLabel.tsx b/packages/react-core/src/components/JumpLinks/examples/JumpLinksWithLabel.tsx new file mode 100644 index 00000000000..5f189a7896b --- /dev/null +++ b/packages/react-core/src/components/JumpLinks/examples/JumpLinksWithLabel.tsx @@ -0,0 +1,17 @@ +import React from 'react'; +import { JumpLinks, JumpLinksItem } from '@patternfly/react-core'; + +export const JumpLinksWithLabel: React.FunctionComponent = () => ( + <> + + Inactive section + Active section + Inactive section + + + Inactive section + Active section + Inactive section + + +);