diff --git a/packages/react-core/src/components/InputGroup/examples/InputGroup.md b/packages/react-core/src/components/InputGroup/examples/InputGroup.md
index fddb92ff4db..3872100de72 100644
--- a/packages/react-core/src/components/InputGroup/examples/InputGroup.md
+++ b/packages/react-core/src/components/InputGroup/examples/InputGroup.md
@@ -8,256 +8,24 @@ import AtIcon from '@patternfly/react-icons/dist/esm/icons/at-icon';
import DollarSignIcon from '@patternfly/react-icons/dist/esm/icons/dollar-sign-icon';
import CalendarAltIcon from '@patternfly/react-icons/dist/esm/icons/calendar-alt-icon';
import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
-import {
- Button,
- ButtonVariant,
- TextArea,
- InputGroup,
- InputGroupText,
- TextInput,
- Dropdown,
- DropdownToggle,
- DropdownItem,
- Popover,
- PopoverPosition
-} from '@patternfly/react-core';
## Examples
### Basic
-```js
-import React from 'react';
-import AtIcon from '@patternfly/react-icons/dist/esm/icons/at-icon';
-import {
- Button,
- InputGroup,
- InputGroupText,
- InputGroupTextVariant,
- TextInput,
- ValidatedOptions
-} from '@patternfly/react-core';
-
-class SimpleInputGroups extends React.Component {
- constructor(props) {
- super(props);
- }
-
- render() {
- return (
-
-
-
- @example.com
-
-
-
-
-
-
-
-
-
-
-
- %
-
-
- );
- }
-}
+```ts file='./InputGroupBasic.tsx'
```
### With textarea
-```js
-import React from 'react';
-import {
- Button,
- TextArea,
- InputGroup
-} from '@patternfly/react-core';
-
-class SimpleInputGroups extends React.Component {
- constructor(props) {
- super(props);
- }
-
- render() {
- return (
-
-
-
-
-
-
- );
- }
-}
+```ts file='./InputGroupWithTextarea.tsx'
```
### With dropdown
-```js
-import React from 'react';
-import {
- Button,
- InputGroup,
- TextInput,
- Dropdown,
- DropdownToggle,
- DropdownItem
-} from '@patternfly/react-core';
-
-class SimpleInputGroups extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- isOpen: false,
- selected: ''
- };
- this.onToggle = isOpen => {
- this.setState({
- isOpen
- });
- };
- this.onSelect = event => {
- this.setState({
- isOpen: false,
- selected: event.currentTarget.value
- });
- };
- }
-
- render() {
- return (
-
-
-
- {this.state.selected ? this.state.selected : 'Dropdown'}
-
- }
- isOpen={this.state.isOpen}
- dropdownItems={[
-
- Option 1
- ,
-
- Option 2
- ,
-
- Option 3
-
- ]}
- />
-
-
-
-
- );
- }
-}
+```ts file='./InputGroupWithDropdown.tsx'
```
### With popover
-```js
-import React from 'react';
-import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
-import {
- Button,
- InputGroup,
- TextInput,
- Popover,
- PopoverPosition
-} from '@patternfly/react-core';
-
-class SimpleInputGroups extends React.Component {
- constructor(props) {
- super(props);
- }
-
- render() {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
-}
+```ts file ='./InputGroupWithPopover.tsx'
```
-
### With multiple group siblings
-```js
-import React from 'react';
-import DollarSignIcon from '@patternfly/react-icons/dist/esm/icons/dollar-sign-icon';
-import {
- Button,
- TextArea,
- InputGroup,
- InputGroupText,
- TextInput
-} from '@patternfly/react-core';
-
-class SimpleInputGroups extends React.Component {
- constructor(props) {
- super(props);
- }
-
- render() {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- .00
-
-
- );
- }
-}
+```ts file='./InputGroupWithSiblings.tsx'
```
diff --git a/packages/react-core/src/components/InputGroup/examples/InputGroupBasic.tsx b/packages/react-core/src/components/InputGroup/examples/InputGroupBasic.tsx
new file mode 100644
index 00000000000..ba05602c7d3
--- /dev/null
+++ b/packages/react-core/src/components/InputGroup/examples/InputGroupBasic.tsx
@@ -0,0 +1,31 @@
+import React from 'react';
+import AtIcon from '@patternfly/react-icons/dist/esm/icons/at-icon';
+import { InputGroup, InputGroupText, InputGroupTextVariant, TextInput, ValidatedOptions } from '@patternfly/react-core';
+
+export const InputGroupBasic: React.FunctionComponent = () => (
+
+
+
+ @example.com
+
+
+
+
+
+
+
+
+
+
+
+
+ %
+
+
+
+);
diff --git a/packages/react-core/src/components/InputGroup/examples/InputGroupWithDropdown.tsx b/packages/react-core/src/components/InputGroup/examples/InputGroupWithDropdown.tsx
new file mode 100644
index 00000000000..d5a03e683cf
--- /dev/null
+++ b/packages/react-core/src/components/InputGroup/examples/InputGroupWithDropdown.tsx
@@ -0,0 +1,43 @@
+import React from 'react';
+import { Button, InputGroup, TextInput, Dropdown, DropdownToggle, DropdownItem } from '@patternfly/react-core';
+
+export const InputGroupWithDropdown: React.FunctionComponent = () => {
+ const [isOpen, setIsOpen] = React.useState(false);
+
+ const onToggle = (isOpen: boolean) => {
+ setIsOpen(isOpen);
+ };
+
+ const onSelect = () => {
+ setIsOpen(false);
+ };
+
+ const dropdownItems = [
+
+ Option 1
+ ,
+
+ Option 2
+ ,
+
+ Option 3
+
+ ];
+
+ return (
+
+
+ Dropdown}
+ isOpen={isOpen}
+ dropdownItems={dropdownItems}
+ />
+
+
+
+
+ );
+};
diff --git a/packages/react-core/src/components/InputGroup/examples/InputGroupWithPopover.tsx b/packages/react-core/src/components/InputGroup/examples/InputGroupWithPopover.tsx
new file mode 100644
index 00000000000..683dd9c612d
--- /dev/null
+++ b/packages/react-core/src/components/InputGroup/examples/InputGroupWithPopover.tsx
@@ -0,0 +1,33 @@
+import React from 'react';
+import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
+import { Button, InputGroup, TextInput, Popover, PopoverPosition } from '@patternfly/react-core';
+
+export const InputGroupWithPopover: React.FunctionComponent = () => (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+);
diff --git a/packages/react-core/src/components/InputGroup/examples/InputGroupWithSiblings.tsx b/packages/react-core/src/components/InputGroup/examples/InputGroupWithSiblings.tsx
new file mode 100644
index 00000000000..7c52717c8a1
--- /dev/null
+++ b/packages/react-core/src/components/InputGroup/examples/InputGroupWithSiblings.tsx
@@ -0,0 +1,32 @@
+import React from 'react';
+import DollarSignIcon from '@patternfly/react-icons/dist/esm/icons/dollar-sign-icon';
+import { Button, TextArea, InputGroup, InputGroupText, TextInput } from '@patternfly/react-core';
+
+export const InputGroupWithSiblings: React.FunctionComponent = () => (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .00
+
+
+);
diff --git a/packages/react-core/src/components/InputGroup/examples/InputGroupWithTextarea.tsx b/packages/react-core/src/components/InputGroup/examples/InputGroupWithTextarea.tsx
new file mode 100644
index 00000000000..4800035219d
--- /dev/null
+++ b/packages/react-core/src/components/InputGroup/examples/InputGroupWithTextarea.tsx
@@ -0,0 +1,13 @@
+import React from 'react';
+import { Button, TextArea, InputGroup } from '@patternfly/react-core';
+
+export const InputGroupWithTextarea: React.FunctionComponent = () => (
+
+
+
+
+
+
+);