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