(props: OptionGroupProps)
| 930 | |
| 931 | /** Provides a way to group options in a select menu or multi-select menu. */ |
| 932 | export const OptionGroup = (props: OptionGroupProps) => ( |
| 933 | <component |
| 934 | {...props} |
| 935 | componentType="option-group" |
| 936 | toSlackElement={(props, reconcile, promises) => { |
| 937 | const instance: any = { |
| 938 | isOptionGroup: () => true, |
| 939 | options: [], |
| 940 | }; |
| 941 | |
| 942 | const [label, labelPromises] = reconcile(props.label); |
| 943 | |
| 944 | instance.label = label; |
| 945 | |
| 946 | if (instance.label) { |
| 947 | instance.label.type = "plain_text"; |
| 948 | } |
| 949 | |
| 950 | promises.push(...labelPromises); |
| 951 | |
| 952 | return instance; |
| 953 | }} |
| 954 | /> |
| 955 | ); |
| 956 | |
| 957 | interface SelectMenuBase { |
| 958 | /** |
nothing calls this directly
no test coverage detected