Skip to content

Commit

Permalink
Merge pull request #493 from kiwicom/fix/inputgroup-without-label
Browse files Browse the repository at this point in the history
FIX: InputGroup without label
  • Loading branch information
tomashapl authored Oct 16, 2018
2 parents aecb70b + 3654788 commit 500489b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 43 deletions.
2 changes: 0 additions & 2 deletions src/InputGroup/InputGroup.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ storiesOf("InputGroup", module)
};
})
.addWithChapters("Phone number", () => {
const label = text("Label", "Phone number");
const flex = array("Flex", ["0 0 130px", "1 1 100%"]);
const error = text("Error", "error");
const help = text("Help", undefined);
Expand All @@ -98,7 +97,6 @@ storiesOf("InputGroup", module)
{
sectionFn: () => (
<InputGroup
label={label}
flex={flex}
error={error}
help={help}
Expand Down
42 changes: 2 additions & 40 deletions src/InputGroup/__snapshots__/InputGroup.stories.storyshot
Original file line number Diff line number Diff line change
Expand Up @@ -1162,17 +1162,9 @@ exports[`Storyshots InputGroup Phone number 1`] = `
}
>
<div
className="InputGroup__StyledInputGroup-boKjnP KiYdr"
className="InputGroup__StyledInputGroup-boKjnP jgBxYZ"
data-test={undefined}
>
<span
className="FormLabel-kJFBRQ fuYBgg"
data-test={undefined}
>
<span>
Phone number
</span>
</span>
<div
className="InputGroup__StyledChildren-kSeqtV igoYWh"
>
Expand Down Expand Up @@ -1269,7 +1261,7 @@ exports[`Storyshots InputGroup Phone number 1`] = `
</div>
</div>
<div
className="InputGroup__FakeGroup-hRQJuE iJJDhz"
className="InputGroup__FakeGroup-hRQJuE iQoHSD"
/>
<div
className="FormFeedback__StyledFormFeedback-cuFyWp cFaoou"
Expand Down Expand Up @@ -1334,36 +1326,6 @@ exports[`Storyshots InputGroup Phone number 1`] = `
InputGroup
</span>
<span>
<span>
<span>
<br />

</span>
<span
style={Object {}}
>
label
</span>
<span>
=
<span
style={Object {}}
>
<span
style={
Object {
"color": "#22a",
"wordBreak": "break-word",
}
}
>
"
Phone number
"
</span>
</span>
</span>
</span>
<span>
<span>
<br />
Expand Down
2 changes: 1 addition & 1 deletion src/InputGroup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const FakeGroup = styled(({ children, className }) => <div className={className}
disabled ? theme.orbit.backgroundInputDisabled : theme.orbit.backgroundInput};
font-size: ${({ theme }) => theme.orbit.fontSizeInputNormal};
transition: box-shadow ${({ theme }) => theme.orbit.durationFast} ease-in-out;
margin-top: 23px;
margin-top: ${({ label }) => label && "23px"};
&:hover {
box-shadow: inset 0 0 0
Expand Down

0 comments on commit 500489b

Please sign in to comment.