mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
Vertically center elements in TodoFooters
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user