Skip to content

Commit 5d72064

Browse files
committed
pr updates
1 parent f2c88d8 commit 5d72064

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

packages/react-templates/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This package provides wrapped Patternfly component demos with a streamlined API
66

77
#### Node Environment
88

9-
This project currently supports Node [Active LTS](https://github.com/nodejs/Release#release-schedule) releases. Please stay current with Node Active LTS when developing patternfly-react.
9+
This project currently supports [Node Active LTS](https://github.com/nodejs/Release#release-schedule) releases. Please stay current with Node Active LTS when developing patternfly-react.
1010

1111
For example, to develop with Node 18, use the following:
1212

@@ -15,7 +15,7 @@ nvm install 18
1515
nvm use 18
1616
```
1717

18-
This project also requires a Yarn version of >=1.6.0. The latest version can be installed [here](https://yarnpkg.com/).
18+
This project also requires a Yarn version of >=1.6.0. The latest version can be installed from the [Yarn](https://yarnpkg.com/) home page.
1919

2020
### Installing
2121

packages/react-templates/src/components/Select/SelectSimple.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React from 'react';
2-
import { Select, SelectList } from '@patternfly/react-core/dist/esm/components/Select';
2+
import { Select, SelectList, SelectOptionProps } from '@patternfly/react-core/dist/esm/components/Select';
33
import { MenuToggle, MenuToggleElement } from '@patternfly/react-core/dist/esm/components/MenuToggle';
44

55
export interface SelectSimpleProps {
66
/** @hide Forwarded ref */
77
innerRef?: React.Ref<any>;
88
/** Initial options of the select. */
9-
initialOptions?: React.ReactElement[];
9+
initialOptions?: SelectOptionProps[];
1010
/** Callback triggered on selection. */
1111
onSelect?: (_event: React.MouseEvent<Element, MouseEvent>, selection: string | number) => void;
1212
/** Callback triggered when the select opens or closes. */
@@ -15,6 +15,8 @@ export interface SelectSimpleProps {
1515
isDisabled?: boolean;
1616
/** Content of the toggle. Defaults to the selected option. */
1717
toggleContent?: React.ReactNode;
18+
/** Width of the toggle */
19+
toggleWidth?: string;
1820
}
1921

2022
const SelectSimpleBase: React.FunctionComponent<SelectSimpleProps> = ({
@@ -24,6 +26,7 @@ const SelectSimpleBase: React.FunctionComponent<SelectSimpleProps> = ({
2426
onSelect,
2527
onToggle,
2628
toggleContent,
29+
toggleWidth = '200px',
2730
...props
2831
}: SelectSimpleProps) => {
2932
const [isOpen, setIsOpen] = React.useState(false);
@@ -48,7 +51,7 @@ const SelectSimpleBase: React.FunctionComponent<SelectSimpleProps> = ({
4851
isDisabled={isDisabled}
4952
style={
5053
{
51-
width: '200px'
54+
width: toggleWidth
5255
} as React.CSSProperties
5356
}
5457
>

packages/react-templates/src/components/Select/examples/SelectTemplates.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ id: Select
33
section: components
44
subsection: menus
55
template: true
6+
beta: true
67
propComponents: ['SimpleSelect']
78
---
89

0 commit comments

Comments
 (0)