Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix(misc): fixed broken CodeSandbox demos #9519

Merged
merged 4 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
DropdownItem
} from '@patternfly/react-core';
import ThIcon from '@patternfly/react-icons/dist/js/icons/th-icon';
import pfIcon from 'pf-logo-small.svg';
import pfIcon from '@patternfly/react-core/src/demos/Card/pf-logo-small.svg';

const MockLink: React.FunctionComponent = ({ to, ...props }: any) => <a href={to} {...props}></a>;

Expand Down
3 changes: 1 addition & 2 deletions packages/react-core/src/demos/PrimaryDetail.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import DashboardWrapper from './examples/DashboardWrapper';
### Primary-detail full page

```js file="./examples/PrimaryDetail/PrimaryDetailFullPage.tsx" isFullscreen

```

### Primary-detail content padding
Expand Down Expand Up @@ -554,7 +553,7 @@ class PrimaryDetailCardView extends React.Component {
}}
selectableActions={{ isChecked: selectedItems.includes(product.id), selectableActionId: `selectable-actions-item-${product.id}`, selectableActionAriaLabelledby: `${'card-view-' + key}`, name: `check-${product.id}`, onChange: () => this.onClick(product.id) }}
>
<img src={icons[product.icon]} alt={`${product.name} icon`} style={{ height: '50px' }} />
<img src={require(icons[product.icon])} alt={`${product.name} icon`} style={{ height: '50px' }} />
</CardHeader>
<CardTitle>
<Button variant="link" isInline onClick={() => this.onCardClick(product.id)} aria-expanded={activeCard === product.id}>
Expand Down
2 changes: 1 addition & 1 deletion packages/react-table/src/docs/demos/Table.md
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ import {
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
import { Table, TableText, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
import { rows, columns } from '';
import { rows, columns } from './sampleData';

class FilterTableDemo extends React.Component {
constructor(props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
} from '@patternfly/react-core';
import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';

import { rows, columns } from './sampleData';

export const BulkSelectTableDemo = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';

import {
Button,
Card,
DataList,
DataListCheck,
DataListItem,
Expand All @@ -17,8 +18,7 @@ import {
OverflowMenu,
OverflowMenuGroup,
OverflowMenuItem,
OptionsMenu,
OptionsMenuToggle,
PageSection,
Pagination,
PaginationVariant,
Text,
Expand All @@ -29,7 +29,6 @@ import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
import SortAmountDownIcon from '@patternfly/react-icons/dist/esm/icons/sort-amount-down-icon';
import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper.js';
import { capitalize } from '@patternfly/react-table/src/components/Table/utils/utils';

import { rows, columns } from './sampleData';

export const ColumnManagementAction = () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/react-table/src/docs/demos/table-demos/Compact.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from 'react';
import {
Button,
Card,
Label,
MenuToggle,
MenuToggleElement,
Pagination,
Expand All @@ -14,11 +15,10 @@ import {
ToolbarGroup,
ToolbarItem
} from '@patternfly/react-core';
import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
import { Table, TableText, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';

import { rows, columns } from './sampleData';
import { rows, columns } from '@patternfly/react-table/src/docs/demos/table-demos/sampleData';

export const CompactTable = () => {
const [isSelectOpen, setIsSelectOpen] = React.useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@ import {
DropdownList,
Flex,
FlexItem,
Label,
MenuToggle,
MenuToggleElement,
OverflowMenu,
OverflowMenuContent,
OverflowMenuControl,
OverflowMenuDropdownItem,
OverflowMenuGroup,
OverflowMenuItem,
PageSection,
Pagination,
Select,
SelectOption,
SelectList,
SelectGroup,
Expand Down Expand Up @@ -89,7 +97,7 @@ export const ComposableTableSortable = () => {
setPerPage(newPerPage);
};

renderPagination = (variant) => (
const renderPagination = (variant) => (
<Pagination
isCompact
itemCount={rows.length}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
Select,
SelectOption
} from '@patternfly/react-core';
import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
import { Table, TableText, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';

Expand Down