Fix confirmation modal size (#1295)
This commit is contained in:
@ -71,16 +71,6 @@ type OwnProps = {
|
|||||||
isDisplayModeFixHeight?: boolean;
|
isDisplayModeFixHeight?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
function displayEmptyIfNothingToShow(
|
|
||||||
children: React.ReactNode,
|
|
||||||
isDisplayModeContentEmpty?: boolean,
|
|
||||||
): React.ReactNode {
|
|
||||||
if (isDisplayModeContentEmpty || !children) {
|
|
||||||
return <StyledEmptyField>{'Empty'}</StyledEmptyField>;
|
|
||||||
}
|
|
||||||
return children;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function EditableFieldDisplayMode({
|
export function EditableFieldDisplayMode({
|
||||||
children,
|
children,
|
||||||
disableClick,
|
disableClick,
|
||||||
@ -98,7 +88,11 @@ export function EditableFieldDisplayMode({
|
|||||||
isDisplayModeFixHeight={isDisplayModeFixHeight}
|
isDisplayModeFixHeight={isDisplayModeFixHeight}
|
||||||
>
|
>
|
||||||
<StyledEditableFieldNormalModeInnerContainer>
|
<StyledEditableFieldNormalModeInnerContainer>
|
||||||
{displayEmptyIfNothingToShow(children, isDisplayModeContentEmpty)}
|
{isDisplayModeContentEmpty || !children ? (
|
||||||
|
<StyledEmptyField>{'Empty'}</StyledEmptyField>
|
||||||
|
) : (
|
||||||
|
children
|
||||||
|
)}
|
||||||
</StyledEditableFieldNormalModeInnerContainer>
|
</StyledEditableFieldNormalModeInnerContainer>
|
||||||
</StyledEditableFieldNormalModeOuterContainer>
|
</StyledEditableFieldNormalModeOuterContainer>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -26,6 +26,7 @@ export type ConfirmationModalProps = {
|
|||||||
|
|
||||||
const StyledConfirmationModal = styled(Modal)`
|
const StyledConfirmationModal = styled(Modal)`
|
||||||
padding: ${({ theme }) => theme.spacing(4)};
|
padding: ${({ theme }) => theme.spacing(4)};
|
||||||
|
width: calc(400px - ${({ theme }) => theme.spacing(10 * 2)});
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledCenteredButton = styled(Button)`
|
const StyledCenteredButton = styled(Button)`
|
||||||
|
|||||||
Reference in New Issue
Block a user