({
control,
children,
styles,
ref
}: {
control: PropControl;
children: ReactNode;
styles?: StyleString;
ref?: Ref<HTMLDivElement>;
})
| 830 | } |
| 831 | |
| 832 | function Wrapper({ |
| 833 | control, |
| 834 | children, |
| 835 | styles, |
| 836 | ref |
| 837 | }: { |
| 838 | control: PropControl; |
| 839 | children: ReactNode; |
| 840 | styles?: StyleString; |
| 841 | ref?: Ref<HTMLDivElement>; |
| 842 | }) { |
| 843 | return ( |
| 844 | <div |
| 845 | ref={ref} |
| 846 | className={mergeStyles( |
| 847 | style({display: 'flex', flexDirection: 'column', justifyContent: 'space-between'}), |
| 848 | styles |
| 849 | )}> |
| 850 | <span |
| 851 | className={style({ |
| 852 | font: 'ui', |
| 853 | color: 'neutral-subdued', |
| 854 | display: 'flex', |
| 855 | paddingBottom: `calc((${size(32)} - 1lh) / 2)` |
| 856 | })}> |
| 857 | <span className={style({truncate: true})}>{control.name}</span> |
| 858 | <span className={style({whiteSpace: 'nowrap'})}> |
| 859 | |
| 860 | {control.description ? ( |
| 861 | <CenterBaseline |
| 862 | styles={style({ |
| 863 | display: 'inline-flex', |
| 864 | height: 0 |
| 865 | })}> |
| 866 | <PropContextualHelp control={control} /> |
| 867 | </CenterBaseline> |
| 868 | ) : null} |
| 869 | </span> |
| 870 | </span> |
| 871 | {children} |
| 872 | </div> |
| 873 | ); |
| 874 | } |
| 875 | |
| 876 | function PropContextualHelp({control}) { |
| 877 | if (!control.description) { |
nothing calls this directly
no test coverage detected