Skip to content

Commit

Permalink
refactor(ui): button - apply mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
artyorsh authored Apr 5, 2019
1 parent b1e6071 commit a6f778c
Show file tree
Hide file tree
Showing 4 changed files with 276 additions and 131 deletions.
2 changes: 2 additions & 0 deletions src/framework/ui/button/button.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export class Button extends React.Component<Props> {
const {
textColor,
textFontSize,
textLineHeight,
textFontWeight,
textMarginHorizontal,
iconWidth,
Expand All @@ -96,6 +97,7 @@ export class Button extends React.Component<Props> {
text: {
color: textColor,
fontSize: textFontSize,
lineHeight: textLineHeight,
fontWeight: textFontWeight,
marginHorizontal: textMarginHorizontal,
...derivedTextStyle,
Expand Down
81 changes: 44 additions & 37 deletions src/framework/ui/button/button.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ exports[`@button: matches snapshot * appearance * empty 1`] = `
style={
Object {
"alignItems": "center",
"backgroundColor": "#2196F3",
"borderRadius": 6,
"backgroundColor": "#3366FF",
"borderRadius": 8,
"flexDirection": "row",
"justifyContent": "space-evenly",
"minHeight": 24,
"minWidth": 24,
"padding": 4,
"minHeight": 40,
"minWidth": 40,
"paddingHorizontal": 10,
"paddingVertical": 12,
}
}
theme={
Expand Down Expand Up @@ -144,13 +145,14 @@ exports[`@button: matches snapshot * appearance * icon 1`] = `
style={
Object {
"alignItems": "center",
"backgroundColor": "#2196F3",
"borderRadius": 6,
"backgroundColor": "#3366FF",
"borderRadius": 8,
"flexDirection": "row",
"justifyContent": "space-evenly",
"minHeight": 24,
"minWidth": 24,
"padding": 4,
"minHeight": 40,
"minWidth": 40,
"paddingHorizontal": 10,
"paddingVertical": 12,
}
}
theme={
Expand Down Expand Up @@ -265,10 +267,10 @@ exports[`@button: matches snapshot * appearance * icon 1`] = `
}
style={
Object {
"height": 13,
"marginHorizontal": 4,
"tintColor": "#ffffff",
"width": 13,
"height": 16,
"marginHorizontal": 10,
"tintColor": "#FFFFFF",
"width": 16,
}
}
/>
Expand All @@ -290,13 +292,14 @@ exports[`@button: matches snapshot * appearance * icon and text 1`] = `
style={
Object {
"alignItems": "center",
"backgroundColor": "#2196F3",
"borderRadius": 6,
"backgroundColor": "#3366FF",
"borderRadius": 8,
"flexDirection": "row",
"justifyContent": "space-evenly",
"minHeight": 24,
"minWidth": 24,
"padding": 4,
"minHeight": 40,
"minWidth": 40,
"paddingHorizontal": 10,
"paddingVertical": 12,
}
}
theme={
Expand Down Expand Up @@ -411,10 +414,10 @@ exports[`@button: matches snapshot * appearance * icon and text 1`] = `
}
style={
Object {
"height": 13,
"marginHorizontal": 4,
"tintColor": "#ffffff",
"width": 13,
"height": 16,
"marginHorizontal": 10,
"tintColor": "#FFFFFF",
"width": 16,
}
}
/>
Expand All @@ -423,9 +426,10 @@ exports[`@button: matches snapshot * appearance * icon and text 1`] = `
Array [
Object {
"color": "#ffffff",
"fontSize": 12,
"fontSize": 14,
"fontWeight": "800",
"marginHorizontal": 4,
"lineHeight": 16,
"marginHorizontal": 10,
},
Object {},
]
Expand All @@ -450,13 +454,14 @@ exports[`@button: matches snapshot * appearance * text 1`] = `
style={
Object {
"alignItems": "center",
"backgroundColor": "#2196F3",
"borderRadius": 6,
"backgroundColor": "#3366FF",
"borderRadius": 8,
"flexDirection": "row",
"justifyContent": "space-evenly",
"minHeight": 24,
"minWidth": 24,
"padding": 4,
"minHeight": 40,
"minWidth": 40,
"paddingHorizontal": 10,
"paddingVertical": 12,
}
}
theme={
Expand Down Expand Up @@ -568,9 +573,10 @@ exports[`@button: matches snapshot * appearance * text 1`] = `
Array [
Object {
"color": "#ffffff",
"fontSize": 12,
"fontSize": 14,
"fontWeight": "800",
"marginHorizontal": 4,
"lineHeight": 16,
"marginHorizontal": 10,
},
Object {},
]
Expand All @@ -595,13 +601,14 @@ exports[`@button: matches snapshot * interaction * stateless 1`] = `
style={
Object {
"alignItems": "center",
"backgroundColor": "#2196F3",
"borderRadius": 6,
"backgroundColor": "#3366FF",
"borderRadius": 8,
"flexDirection": "row",
"justifyContent": "space-evenly",
"minHeight": 24,
"minWidth": 24,
"padding": 4,
"minHeight": 40,
"minWidth": 40,
"paddingHorizontal": 10,
"paddingVertical": 12,
}
}
theme={
Expand Down
Loading

0 comments on commit a6f778c

Please sign in to comment.