Skip to content

Commit

Permalink
update export syntax
Browse files Browse the repository at this point in the history
revert to js to fix ci build

fix dashboard wrapper paths

declare demos as ts files

fix imports

add DashboardWrapper import to md file

change back to js declarations to fix build

remove dashboardwrapper import from md file
  • Loading branch information
jenny-s51 committed Oct 13, 2023
1 parent c56eda9 commit eeb3714
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 57 deletions.
43 changes: 6 additions & 37 deletions packages/react-core/src/demos/Wizard/WizardDemo.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,61 +11,30 @@ import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';

### In modal

<<<<<<< HEAD
```js isFullscreen
import React from 'react';
import {
Card,
CardBody,
Gallery,
GalleryItem,
PageSection,
Modal,
ModalVariant,
Wizard,
WizardHeader,
WizardStep
} from '@patternfly/react-core';
import { DashboardWrapper } from '@patternfly/react-core/src/demos/DashboardWrapper';
=======
```ts file="../examples/Wizard/InModal.tsx" isFullscreen
>>>>>>> e91704cf2 (chore(Wizard) convert demos to TS)
```js file="../examples/Wizard/InModal.tsx" isFullscreen
```

### In modal, with drawer

```ts file="../examples/Wizard/InModalWithDrawer.tsx" isFullscreen
```js file="../examples/Wizard/InModalWithDrawer.tsx" isFullscreen
```

### In modal, with drawer and informational step

```ts file="../examples/Wizard/InModalWithDrawerInformationalStep.tsx" isFullscreen
```js file="../examples/Wizard/InModalWithDrawerInformationalStep.tsx" isFullscreen
```

### In page

<<<<<<< HEAD
```js isFullscreen
import React from 'react';
import { PageSection, PageSectionTypes, PageSectionVariants, Wizard, WizardStep } from '@patternfly/react-core';
import { DashboardWrapper } from '@patternfly/react-core/src/demos/DashboardWrapper';
=======
```ts file="../examples/Wizard/InPage.tsx" isFullscreen
>>>>>>> e91704cf2 (chore(Wizard) convert demos to TS)

```js file="../examples/Wizard/InPage.tsx" isFullscreen
```

### In page, with drawer

```ts file="../examples/Wizard/InPageWithDrawer.tsx" isFullscreen

```js file="../examples/Wizard/InPageWithDrawer.tsx" isFullscreen
```

### In page, with drawer and informational step

```ts file="../examples/Wizard/InPageWithDrawerInformationalStep.tsx" isFullscreen

```js file="../examples/Wizard/InPageWithDrawerInformationalStep.tsx" isFullscreen
```
6 changes: 2 additions & 4 deletions packages/react-core/src/demos/examples/Wizard/InModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {
WizardHeader,
WizardStep
} from '@patternfly/react-core';
import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
import { DashboardWrapper } from '@patternfly/react-core/src/demos/DashboardWrapper';

const WizardInModalDemo: React.FC = () => (
export const WizardInModalDemo: React.FunctionComponent = () => (
<>
<DashboardWrapper hasPageTemplateTitle>
<PageSection isWidthLimited>
Expand Down Expand Up @@ -73,5 +73,3 @@ const WizardInModalDemo: React.FC = () => (
</Modal>
</>
);

export default WizardInModalDemo;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
DrawerColorVariant
} from '@patternfly/react-core';

const WizardModalWithDrawerDemo: React.FC = () => {
export const WizardModalWithDrawerDemo: React.FC = () => {
const [isDrawerExpanded, setIsDrawerExpanded] = React.useState(false);
const drawerRef = React.useRef<HTMLSpanElement | null>(null);

Expand Down Expand Up @@ -105,5 +105,3 @@ const WizardModalWithDrawerDemo: React.FC = () => {
</Modal>
);
};

export default WizardModalWithDrawerDemo;
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
DrawerColorVariant
} from '@patternfly/react-core';

const WizardModalWithDrawerInfoStepDemo: React.FC = () => {
export const WizardModalWithDrawerInfoStepDemo: React.FC = () => {
const [isDrawerExpanded, setIsDrawerExpanded] = React.useState(false);
const drawerRef = React.useRef<HTMLSpanElement | null>(null);

Expand Down Expand Up @@ -112,5 +112,3 @@ const WizardModalWithDrawerInfoStepDemo: React.FC = () => {
</Modal>
);
};

export default WizardModalWithDrawerInfoStepDemo;
6 changes: 2 additions & 4 deletions packages/react-core/src/demos/examples/Wizard/InPage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { PageSection, PageSectionTypes, PageSectionVariants, Wizard, WizardStep } from '@patternfly/react-core';
import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
import { DashboardWrapper } from '@patternfly/react-core/src/demos/DashboardWrapper';

const WizardFullPage: React.FC = () => (
export const WizardFullPage: React.FC = () => (
<React.Fragment>
<DashboardWrapper hasPageTemplateTitle>
<PageSection type={PageSectionTypes.wizard} variant={PageSectionVariants.light}>
Expand Down Expand Up @@ -33,5 +33,3 @@ const WizardFullPage: React.FC = () => (
</DashboardWrapper>
</React.Fragment>
);

export default WizardFullPage;
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
import pfLogo from '@patternfly/react-core/src/demos/assets/pf-logo.svg';
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';

const WizardFullPageWithDrawerDemo: React.FC = () => {
export const WizardFullPageWithDrawerDemo: React.FC = () => {
const [isDrawerExpanded, setIsDrawerExpanded] = React.useState(false);
const [activeItem, setActiveItem] = React.useState(0);

Expand Down Expand Up @@ -186,5 +186,3 @@ const WizardFullPageWithDrawerDemo: React.FC = () => {
</React.Fragment>
);
};

export default WizardFullPageWithDrawerDemo;
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
import pfLogo from '@patternfly/react-core/src/demos/assets/pf-logo.svg';
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';

const WizardFullPageWithDrawerInfoStepDemo: React.FC = () => {
export const WizardFullPageWithDrawerInfoStepDemo: React.FC = () => {
const [isDrawerExpanded, setIsDrawerExpanded] = React.useState(false);
const [activeItem, setActiveItem] = React.useState(0);

Expand Down Expand Up @@ -187,5 +187,3 @@ const WizardFullPageWithDrawerInfoStepDemo: React.FC = () => {
</React.Fragment>
);
};

export default WizardFullPageWithDrawerInfoStepDemo;

0 comments on commit eeb3714

Please sign in to comment.