Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪟 🐛 Connection Name styles match other fields on Connection create #20377

Merged
merged 11 commits into from
Jan 4, 2023
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
@forward "../../views/Connection/ConnectionForm/ConnectionFormFields.module.scss";
@use "../../scss/variables";

.labelHeading {
line-height: 16px;
display: inline;
}

.connectionLabel {
max-width: 328px;
margin-right: variables.$spacing-xl;
vertical-align: top;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { FormattedMessage, useIntl } from "react-intl";

import { ControlLabels } from "components/LabeledControl";
import { FlexContainer } from "components/ui/Flex";
import { Heading } from "components/ui/Heading";
import { Input } from "components/ui/Input";

import { Section } from "views/Connection/ConnectionForm/components/Section";
Expand All @@ -14,20 +13,15 @@ export const CreateConnectionNameField = () => {
const { formatMessage } = useIntl();

return (
<Section>
<Section title={<FormattedMessage id="connection.title" />}>
edmundito marked this conversation as resolved.
Show resolved Hide resolved
<Field name="name">
{({ field, meta }: FieldProps<string>) => (
<FlexContainer alignItems="flex-start">
<div className={styles.leftFieldCol}>
<ControlLabels
className={styles.connectionLabel}
nextLine
error={!!meta.error && meta.touched}
label={
<Heading as="h5" className={styles.labelHeading}>
<FormattedMessage id="form.connectionName" />
</Heading>
}
label={<FormattedMessage id="form.connectionName" />}
message={formatMessage({
id: "form.connectionName.message",
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ exports[`CreateConnectionForm should render 1`] = `
<div
class="<removed-for-snapshot-test>"
>
<h2
class="<removed-for-snapshot-test>"
>
Connection
</h2>
<div
class="<removed-for-snapshot-test>"
>
Expand All @@ -27,11 +32,7 @@ exports[`CreateConnectionForm should render 1`] = `
<label
class="<removed-for-snapshot-test>"
>
<h5
class="<removed-for-snapshot-test>"
>
Connection name*
</h5>
Connection name*
<span>
<br />
<span
Expand Down