Skip to content

Commit

Permalink
fix(ui): top-navigation center align
Browse files Browse the repository at this point in the history
  • Loading branch information
artyorsh authored Apr 13, 2019
1 parent 7203d2b commit a01cbd1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/framework/ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/framework/ui/topNavigation/topNavigation.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ const styles = StyleSheet.create({
subtitle: {},
leftControlContainer: {
flexDirection: 'row',
zIndex: 1,
},
rightControlsContainer: {
flexDirection: 'row',
zIndex: 1,
},
});
8 changes: 8 additions & 0 deletions src/framework/ui/topNavigation/topNavigation.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ exports[`@top-navigation-bar/action * bar/alignment: center 1`] = `
style={
Object {
"flexDirection": "row",
"zIndex": 1,
}
}
/>
Expand Down Expand Up @@ -422,6 +423,7 @@ exports[`@top-navigation-bar/action * bar/alignment: center 1`] = `
style={
Object {
"flexDirection": "row",
"zIndex": 1,
}
}
/>
Expand Down Expand Up @@ -553,6 +555,7 @@ exports[`@top-navigation-bar/action * bar/subtitle 1`] = `
style={
Object {
"flexDirection": "row",
"zIndex": 1,
}
}
/>
Expand Down Expand Up @@ -594,6 +597,7 @@ exports[`@top-navigation-bar/action * bar/subtitle 1`] = `
style={
Object {
"flexDirection": "row",
"zIndex": 1,
}
}
/>
Expand Down Expand Up @@ -725,6 +729,7 @@ exports[`@top-navigation-bar/action * bar/title 1`] = `
style={
Object {
"flexDirection": "row",
"zIndex": 1,
}
}
/>
Expand Down Expand Up @@ -754,6 +759,7 @@ exports[`@top-navigation-bar/action * bar/title 1`] = `
style={
Object {
"flexDirection": "row",
"zIndex": 1,
}
}
/>
Expand Down Expand Up @@ -885,6 +891,7 @@ exports[`@top-navigation-bar/action * bar/with actions 1`] = `
style={
Object {
"flexDirection": "row",
"zIndex": 1,
}
}
>
Expand Down Expand Up @@ -942,6 +949,7 @@ exports[`@top-navigation-bar/action * bar/with actions 1`] = `
style={
Object {
"flexDirection": "row",
"zIndex": 1,
}
}
>
Expand Down
2 changes: 1 addition & 1 deletion src/framework/ui/topNavigation/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class TopNavigationAlignments {
margin(leftActionCount: number, rightActionCount: number, actionWidth: number): number {
const diff: number = rightActionCount - leftActionCount;

return (rightActionCount - leftActionCount) * diff;
return actionWidth * diff;
}
};

Expand Down

0 comments on commit a01cbd1

Please sign in to comment.