Skip to content

Commit

Permalink
prevent resizing card when error message is shown or hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
lmossman committed Jan 4, 2023
1 parent 12db741 commit 7088b2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ $controlButtonWidth: 24px;
}

.errorMessage {
// hardcode height to prevent resizing when error message is hidden
height: 16px;
color: colors.$red;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,7 @@ const SchemaEditor = ({ streamFieldPath }: { streamFieldPath: (fieldPath: string
helpers.setValue(val);
}}
/>
{meta.error && (
<Text className={styles.errorMessage}>
<FormattedMessage id={meta.error} />
</Text>
)}
<Text className={styles.errorMessage}>{meta.error && <FormattedMessage id={meta.error} />}</Text>
</>
);
};

0 comments on commit 7088b2c

Please sign in to comment.