Vertically center elements in TodoFooters

This commit is contained in:
Elizabeth Craig
2019-03-05 13:36:07 -08:00
parent 122ce81496
commit 5ce0dba5c4
6 changed files with 6 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ export const TodoFooter = (props: TodoFooterProps) => {
const itemCount = Object.keys(props.todos).filter(id => !props.todos[id].completed).length;
return (
<Stack horizontal horizontalAlign="space-between">
<Stack horizontal horizontalAlign="space-between" verticalAlign="center">
<Text>
{itemCount} item{itemCount === 1 ? '' : 's'} left
</Text>

View File

@@ -14,7 +14,7 @@ export const TodoFooter = (props: TodoFooterProps) => {
// - try it with an object: styles={{ ... }}
// - try it with a function: styles={props => ({ ... })}
return (
<Stack horizontal horizontalAlign="space-between">
<Stack horizontal horizontalAlign="space-between" verticalAlign="center">
<Text>
{itemCount} item{itemCount === 1 ? '' : 's'} left
</Text>

View File

@@ -7,7 +7,7 @@ export const TodoFooter = () => {
const itemCount = Object.keys(context.todos).filter(id => !context.todos[id].completed).length;
return (
<Stack horizontal horizontalAlign="space-between">
<Stack horizontal horizontalAlign="space-between" verticalAlign="center">
<Text>
{itemCount} item{itemCount === 1 ? '' : 's'} left
</Text>

View File

@@ -11,7 +11,7 @@ export const TodoFooter = () => {
const itemCount = Object.keys(todos).filter(id => !todos[id].completed).length;
return (
<Stack horizontal horizontalAlign="space-between">
<Stack horizontal horizontalAlign="space-between" verticalAlign="center">
<Text>
{itemCount} item{itemCount === 1 ? '' : 's'} left
</Text>

View File

@@ -15,7 +15,7 @@ const TodoFooter = (props: TodoFooterProps) => {
const itemCount = Object.keys(todos).filter(id => !todos[id].completed).length;
return (
<Stack horizontal horizontalAlign="space-between">
<Stack horizontal horizontalAlign="space-between" verticalAlign="center">
<Text>
{itemCount} item{itemCount === 1 ? '' : 's'} left
</Text>

View File

@@ -17,7 +17,7 @@ const TodoFooter = (props: TodoFooterProps) => {
const itemCount = Object.keys(todos).filter(id => !todos[id].completed).length;
return (
<Stack horizontal horizontalAlign="space-between">
<Stack horizontal horizontalAlign="space-between" verticalAlign="center">
<Text>
{itemCount} item{itemCount === 1 ? '' : 's'} left
</Text>