({
control,
children,
styles,
ref
}: {
control: PropControl;
children: ReactNode;
styles?: StyleString;
ref?: Ref<HTMLDivElement>;
})
| 847 | } |
| 848 | |
| 849 | function Wrapper({ |
| 850 | control, |
| 851 | children, |
| 852 | styles, |
| 853 | ref |
| 854 | }: { |
| 855 | control: PropControl; |
| 856 | children: ReactNode; |
| 857 | styles?: StyleString; |
| 858 | ref?: Ref<HTMLDivElement>; |
| 859 | }) { |
| 860 | return ( |
| 861 | <div |
| 862 | ref={ref} |
| 863 | className={mergeStyles( |
| 864 | style({display: 'flex', flexDirection: 'column', justifyContent: 'space-between'}), |
| 865 | styles |
| 866 | )}> |
| 867 | <span |
| 868 | className={style({ |
| 869 | font: 'ui', |
| 870 | color: 'neutral-subdued', |
| 871 | display: 'flex', |
| 872 | paddingBottom: `calc((${size(32)} - 1lh) / 2)` |
| 873 | })}> |
| 874 | <span className={style({truncate: true})}>{control.name}</span> |
| 875 | <span className={style({whiteSpace: 'nowrap'})}> |
| 876 | |
| 877 | {control.description ? ( |
| 878 | <CenterBaseline |
| 879 | styles={style({ |
| 880 | display: 'inline-flex', |
| 881 | height: 0 |
| 882 | })}> |
| 883 | <PropContextualHelp control={control} /> |
| 884 | </CenterBaseline> |
| 885 | ) : null} |
| 886 | </span> |
| 887 | </span> |
| 888 | {children} |
| 889 | </div> |
| 890 | ); |
| 891 | } |
| 892 | |
| 893 | function PropContextualHelp({control}) { |
| 894 | if (!control.description) { |
nothing calls this directly
no test coverage detected