Home > @uniformdev/design-system > extractParameterProps

extractParameterProps() function

A function that extracts all common props and element props

Signature:

Parameters

ParameterTypeDescription
propsT & CommonParameterInputProps

Returns:

{ shellProps: { id: string; label: ReactNode; caption: string | undefined; captionTestId: string | undefined; errorMessage: string | undefined; infoMessage: string | undefined; warningMessage: string | undefined; errorTestId: string | undefined; hiddenLabel: boolean | undefined; labelLeadingIcon: ReactNode; menuItems: ReactNode; title: string | undefined; hasOverriddenValue: boolean | undefined; onResetOverriddenValue: (() => void) | undefined; }; innerProps: Omit<T & CommonParameterProps & { caption?: string; menuItems?: ReactNode; actionItems?: React.ReactNode; errorTestId?: string; captionTestId?: string; title?: string; }, "caption" | "label" | "title" | "id" | "warningMessage" | "errorMessage" | "infoMessage" | "errorTestId" | "captionTestId" | "menuItems" | "hiddenLabel" | "labelLeadingIcon" | "hasOverriddenValue" | "onResetOverriddenValue">; }

Example

const { shellProps, innerProps } = extractParameterProps(props)