Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import styles from '@patternfly/react-styles/css/components/ChipGroup/chip-group';
import { css } from '@patternfly/react-styles';
import { Button } from '../Button';
import { Chip } from '../Chip';
import { Chip } from './Chip';
import { Tooltip, TooltipPosition } from '../Tooltip';
import TimesCircleIcon from '@patternfly/react-icons/dist/esm/icons/times-circle-icon';
import { fillTemplate } from '../../helpers';
Expand Down
22 changes: 20 additions & 2 deletions packages/react-core/src/components/Chip/examples/Chip.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,31 @@
id: Chip
section: components
cssPrefix: pf-c-chip
propComponents: ['Chip']
propComponents: ['Chip', 'ChipGroup']
ouia: true
---

## Examples

### Default
### Chip variants
Chips can be removable or read-only. The Overflow chip is a special chip that is used to expand or collapse the content of a chip group.

```ts file='./ChipDefault.tsx'
```

### Chip groups

A chip group is a collection of chips that can be grouped by category and used to represent one or more values assigned to a single attribute. When the value of `numChips` is exceeded, additional chips will be hidden using an overflow chip.

```ts file='./ChipGroupInline.tsx'
```

### Chip groups with categories

```ts file='./ChipGroupWithCategories.tsx'
```

### Chip groups with removable categories

```ts file='./ChipGroupRemovableCategories.tsx'
```
1 change: 1 addition & 0 deletions packages/react-core/src/components/Chip/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './Chip';
export * from './ChipGroup';
24 changes: 0 additions & 24 deletions packages/react-core/src/components/ChipGroup/examples/ChipGroup.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/react-core/src/components/ChipGroup/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { ToolbarItem, ToolbarItemProps } from './ToolbarItem';
import { ChipGroup } from '../ChipGroup';
import { ChipGroup } from '../Chip';
import { Chip } from '../Chip';
import { ToolbarContentContext, ToolbarContext } from './ToolbarUtils';
import { PickOptional } from '../../helpers/typeUtils';
Expand Down
1 change: 0 additions & 1 deletion packages/react-core/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export * from './CalendarMonth';
export * from './Card';
export * from './Checkbox';
export * from './Chip';
export * from './ChipGroup';
export * from './ClipboardCopy';
export * from './CodeBlock';
export * from './DataList';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
SelectDirection,
SelectFooterTabbableItems
} from './selectConstants';
import { ChipGroup, ChipGroupProps } from '../../../components/ChipGroup';
import { ChipGroup, ChipGroupProps } from '../../../components/Chip';
import { Chip } from '../../../components/Chip';
import { Spinner } from '../../../components/Spinner';
import {
Expand Down