Fix Field and Item types (#23)

* fix(field): correct and extend FieldProps

* fix(item): correct bottomSeparator in ItemProps

* fix(field): correct field commentary

* feat(field): add comment about inlineWrap
This commit is contained in:
Lukas Senionis
2022-09-17 16:57:36 +03:00
committed by GitHub
parent aa35e8b64a
commit 218e007234
2 changed files with 11 additions and 8 deletions

View File

@@ -3,17 +3,20 @@ import { findModuleChild } from '../webpack';
import { FooterLegendProps } from './FooterLegend';
export interface FieldProps extends HTMLAttributes<HTMLDivElement>, FooterLegendProps {
label?: string | ReactNode;
bottomSeparator?: boolean;
description?: string | ReactNode;
label?: ReactNode;
bottomSeparator?: 'standard' | 'thick' | 'none';
description?: ReactNode;
disabled?: boolean;
icon?: ReactNode;
childrenLayout?: string;
childrenContainerWidth?: string;
padding?: string;
inlineWrap?: 'keep-inline' | 'shift-children-below'; // If label is too long it will move shildren below before starting to wrap label
childrenLayout?: 'below' | 'inline';
childrenContainerWidth?: 'min' | 'max' | 'fixed'; // Does not work with childrenLayout==='below'
spacingBetweenLabelAndChild?: 'none'; // This applies only when childrenLayout==='below'
padding?: 'none' | 'standard' | 'compact';
className?: string;
highlightOnFocus?: boolean;
indentLevel?: number;
verticalAlignment?: string;
verticalAlignment?: 'center' | 'none'; // Alligns inline label with children
}
export const Field = findModuleChild((m) => {

View File

@@ -5,7 +5,7 @@ export interface ItemProps {
description?: string;
layout?: 'below' | 'inline';
icon?: ReactNode;
bottomSeparator?: boolean;
bottomSeparator?: 'standard' | 'thick' | 'none';
indentLevel?: number;
tooltip?: string;
}