MCPcopy
hub / github.com/maxchehab/phelia / OptionGroup

Function OptionGroup

src/core/components.tsx:932–955  ·  view source on GitHub ↗
(props: OptionGroupProps)

Source from the content-addressed store, hash-verified

930
931/** Provides a way to group options in a select menu or multi-select menu. */
932export 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
957interface SelectMenuBase {
958 /**

Callers

nothing calls this directly

Calls 1

reconcileFunction · 0.85

Tested by

no test coverage detected