Skip to content

Commit

Permalink
Merge pull request #357 from kiwicom/refactor-button-buttonlink
Browse files Browse the repository at this point in the history
FIX: Theming in Button and ButtonLink
  • Loading branch information
Luděk Vepřek committed Sep 18, 2018
2 parents ed90178 + fcda9a5 commit 87c7894
Show file tree
Hide file tree
Showing 17 changed files with 451 additions and 1,305 deletions.
2 changes: 1 addition & 1 deletion src/Alert/__snapshots__/Alert.stories.storyshot
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ exports[`Storyshots Alert Playground 1`] = `
Also you can change the message by changing the Message knob
</div>
<a
className="Button__StyledButton-jJDkJK brpLdX"
className="Button__StyledButton-jJDkJK hsaYEL"
disabled={undefined}
href="#"
size="normal"
Expand Down
3 changes: 2 additions & 1 deletion src/Button/Button.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ storiesOf("Button", module)
],
};
})
.addWithChapters("Button with icon", () => {
.addWithChapters("Button with icons", () => {
const title = text("Title", "Button");
const block = boolean("Block", false);
const type = select("Type", [TYPE_OPTIONS.PRIMARY, TYPE_OPTIONS.SECONDARY], "primary");
Expand All @@ -88,6 +88,7 @@ storiesOf("Button", module)
type={type}
size={size}
iconLeft={IconLeft && <IconLeft />}
iconRight={IconRight && <IconRight />}
>
{title}
</Button>
Expand Down
83 changes: 68 additions & 15 deletions src/Button/__snapshots__/Button.stories.storyshot
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ exports[`Storyshots Button Basic buttons 1`] = `
}
>
<button
className="Button__StyledButton-jJDkJK gZWvZr"
className="Button__StyledButton-jJDkJK jxFvqb"
disabled={undefined}
onClick={[Function]}
size="normal"
Expand Down Expand Up @@ -450,7 +450,7 @@ exports[`Storyshots Button Button as a link 1`] = `
}
>
<a
className="Button__StyledButton-jJDkJK fQFISe"
className="Button__StyledButton-jJDkJK hcbwpG"
disabled={false}
href="https://kiwi.com"
onClick={[Function]}
Expand Down Expand Up @@ -798,7 +798,7 @@ exports[`Storyshots Button Button as a link 1`] = `
</div>
`;

exports[`Storyshots Button Button with icon 1`] = `
exports[`Storyshots Button Button with icons 1`] = `
<div
style={
Object {
Expand Down Expand Up @@ -832,7 +832,7 @@ exports[`Storyshots Button Button with icon 1`] = `
}
}
>
Button with icon
Button with icons
</h1>

<span
Expand Down Expand Up @@ -897,7 +897,7 @@ exports[`Storyshots Button Button with icon 1`] = `
}
>
<button
className="Button__StyledButton-jJDkJK jwjgYl"
className="Button__StyledButton-jJDkJK kuAtlh"
disabled={undefined}
onClick={[Function]}
size="small"
Expand Down Expand Up @@ -929,6 +929,28 @@ exports[`Storyshots Button Button with icon 1`] = `
</svg>
</div>
Button
<div
className="Button__IconContainerRight-fadTMO bJWYgf Button__IconContainer-bZYzaL hnmhXM"
>
<svg
className={undefined}
fill="currentColor"
height="24px"
preserveAspectRatio="xMidYMid meet"
style={
Object {
"color": undefined,
"verticalAlign": "middle",
}
}
viewBox="0 0 24 24"
width="24px"
>
<path
d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"
/>
</svg>
</div>
</div>
</button>
</div>
Expand Down Expand Up @@ -1139,6 +1161,37 @@ exports[`Storyshots Button Button with icon 1`] = `
</span>
</span>
</span>
</span>
<span>
<span>
<br />

</span>
<span
style={Object {}}
>
iconRight
</span>
<span>
=
<span
style={Object {}}
>
<span>
{
<span
style={
Object {
"color": "#666",
}
}
>
&lt;ChevronDown /&gt;
</span>
}
</span>
</span>
</span>
<br />
</span>
</span>
Expand Down Expand Up @@ -1226,7 +1279,7 @@ exports[`Storyshots Button Button with icon 1`] = `
}
>
<button
className="Button__StyledButton-jJDkJK inGGnX"
className="Button__StyledButton-jJDkJK bDFofC"
disabled={undefined}
onClick={[Function]}
size="small"
Expand Down Expand Up @@ -1630,7 +1683,7 @@ exports[`Storyshots Button Default 1`] = `
}
>
<button
className="Button__StyledButton-jJDkJK gZWvZr"
className="Button__StyledButton-jJDkJK jxFvqb"
disabled={undefined}
onClick={[Function]}
size="normal"
Expand Down Expand Up @@ -1887,7 +1940,7 @@ exports[`Storyshots Button Destructive buttons 1`] = `
}
>
<button
className="Button__StyledButton-jJDkJK kTWkoW"
className="Button__StyledButton-jJDkJK iWOfFd"
disabled={undefined}
onClick={[Function]}
size="normal"
Expand Down Expand Up @@ -2291,7 +2344,7 @@ exports[`Storyshots Button Playground 1`] = `
}
>
<button
className="Button__StyledButton-jJDkJK hGSGFa"
className="Button__StyledButton-jJDkJK cLPCER"
disabled={false}
href={undefined}
onClick={[Function]}
Expand Down Expand Up @@ -2965,7 +3018,7 @@ exports[`Storyshots Button Social buttons 1`] = `
}
>
<button
className="Button__StyledButton-jJDkJK gOiByz"
className="Button__StyledButton-jJDkJK iIowwC"
disabled={undefined}
onClick={[Function]}
size="normal"
Expand Down Expand Up @@ -3244,7 +3297,7 @@ exports[`Storyshots Button Social buttons 1`] = `
}
>
<button
className="Button__StyledButton-jJDkJK gRwDFS"
className="Button__StyledButton-jJDkJK lgIDmb"
disabled={undefined}
onClick={[Function]}
size="normal"
Expand Down Expand Up @@ -3615,7 +3668,7 @@ exports[`Storyshots Button Status buttons 1`] = `
}
>
<button
className="Button__StyledButton-jJDkJK tyhZd"
className="Button__StyledButton-jJDkJK caUKYz"
disabled={undefined}
onClick={[Function]}
size="small"
Expand Down Expand Up @@ -3913,7 +3966,7 @@ exports[`Storyshots Button Status buttons 1`] = `
}
>
<button
className="Button__StyledButton-jJDkJK hKqPrq"
className="Button__StyledButton-jJDkJK kmNlOV"
disabled={undefined}
onClick={[Function]}
size="small"
Expand Down Expand Up @@ -4211,7 +4264,7 @@ exports[`Storyshots Button Status buttons 1`] = `
}
>
<button
className="Button__StyledButton-jJDkJK eomBFy"
className="Button__StyledButton-jJDkJK grerPu"
disabled={undefined}
onClick={[Function]}
size="small"
Expand Down Expand Up @@ -4509,7 +4562,7 @@ exports[`Storyshots Button Status buttons 1`] = `
}
>
<button
className="Button__StyledButton-jJDkJK UKmdW"
className="Button__StyledButton-jJDkJK dPVjXv"
disabled={undefined}
onClick={[Function]}
size="small"
Expand Down
Loading

0 comments on commit 87c7894

Please sign in to comment.