Web:Components:Selector: fix types after merge master

This commit is contained in:
Timofey Boyko 2023-07-19 10:28:05 +03:00
parent 92a42b6c9c
commit 8e77c379f6
4 changed files with 12 additions and 8 deletions

View File

@ -17,6 +17,7 @@ export type SelectorProps = {
id?: string;
className?: string;
style?: React.CSSProperties;
withHeader?: boolean;
headerLabel: string;
withoutBackButton?: boolean;
onBackClick?: () => void;

View File

@ -67,11 +67,8 @@ const Selector = ({
loadNextPage,
totalItems,
isLoading,
searchLoader,
rowLoader,
withHeader,
}) => {
const [footerVisible, setFooterVisible] = React.useState(false);
withFooterInput,
withFooterCheckbox,
@ -394,8 +391,8 @@ const Selector = ({
// /** Accepts css style */
// style: PropTypes.object,
/** Add header */
withHeader: PropTypes.bool,
/** Add header */
// withHeader: PropTypes.bool,
// /** Selector header text */
// headerLabel: PropTypes.string,
// /** Hide header back button */

View File

@ -3,6 +3,7 @@ import { Item } from "./../Item/Item.types";
export type BodyProps = {
footerVisible: boolean;
withHeader?: boolean;
isSearch: boolean;
isAllIndeterminate?: boolean;
isAllChecked?: boolean;

View File

@ -4,6 +4,7 @@ import Base from "../../../themes/base";
const StyledBody = styled.div<{
footerVisible: boolean;
withHeader?: boolean;
footerHeight: number;
headerHeight: number;
}>`
@ -11,8 +12,12 @@ const StyledBody = styled.div<{
height: ${(props) =>
props.footerVisible
? `calc(100% - 16px - ${props.footerHeight}px - ${props.headerHeight}px)`
: `calc(100% - 16px - ${props.headerHeight}px)`};
? props.withHeader
? `calc(100% - 16px - ${props.footerHeight}px - ${props.headerHeight}px)`
: `calc(100% - 16px - ${props.footerHeight}px)`
: props.withHeader
? `calc(100% - 16px - ${props.headerHeight}px)`
: `calc(100% - 16px)`};
padding: 16px 0 0 0;