Fix plural in footer with 0 items

This commit is contained in:
Elizabeth Craig
2019-02-28 01:13:11 -08:00
parent 417cbc2fb5
commit 677bc9b71a
15 changed files with 15 additions and 15 deletions

View File

@@ -30,7 +30,7 @@ export const TodoFooter = connect(
return ( return (
<Stack horizontal horizontalAlign="space-between"> <Stack horizontal horizontalAlign="space-between">
<Text> <Text>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount === 1 ? '' : 's'} left
</Text> </Text>
<DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton> <DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton>
</Stack> </Stack>

View File

@@ -6,7 +6,7 @@ export const TodoFooter = (props: any) => {
return ( return (
<footer> <footer>
<span> <span>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount === 1 ? '' : 's'} left
</span> </span>
<button className="submit">Clear Completed</button> <button className="submit">Clear Completed</button>
</footer> </footer>

View File

@@ -6,7 +6,7 @@ export const TodoFooter = props => {
return ( return (
<footer> <footer>
<span> <span>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount === 1 ? '' : 's'} left
</span> </span>
<button className="submit">Clear Completed</button> <button className="submit">Clear Completed</button>
</footer> </footer>

View File

@@ -14,7 +14,7 @@ export const TodoFooter = (props: TodoFooterProps) => {
return ( return (
<footer> <footer>
<span> <span>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount === 1 ? '' : 's'} left
</span> </span>
<button onClick={_onClick} className="submit"> <button onClick={_onClick} className="submit">
Clear Completed Clear Completed

View File

@@ -13,7 +13,7 @@ export const TodoFooter = (props: TodoFooterProps) => {
return ( return (
<Stack horizontal horizontalAlign="space-between"> <Stack horizontal horizontalAlign="space-between">
<Text> <Text>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount === 1 ? '' : 's'} left
</Text> </Text>
<DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton> <DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton>
</Stack> </Stack>

View File

@@ -6,7 +6,7 @@ export const TodoFooter = (props: any) => {
return ( return (
<footer> <footer>
<span> <span>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount <= 1 ? '' : 's'} left
</span> </span>
<button onClick={() => props.clear()} className="button"> <button onClick={() => props.clear()} className="button">
Clear Completed Clear Completed

View File

@@ -13,7 +13,7 @@ export const TodoFooter = (props: TodoFooterProps) => {
return ( return (
<Stack horizontal horizontalAlign="space-between"> <Stack horizontal horizontalAlign="space-between">
<Text> <Text>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount === 1 ? '' : 's'} left
</Text> </Text>
<DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton> <DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton>
</Stack> </Stack>

View File

@@ -34,7 +34,7 @@ export class TodoHeader extends React.Component<TodoHeaderProps, TodoHeaderState
styles={props => ({ styles={props => ({
...(props.focused && { ...(props.focused && {
field: { field: {
backgroundColor: 'black' backgroundColor: '#c7e0f4'
} }
}) })
})} })}

View File

@@ -16,7 +16,7 @@ export const TodoFooter = (props: TodoFooterProps) => {
return ( return (
<Stack horizontal horizontalAlign="space-between"> <Stack horizontal horizontalAlign="space-between">
<Text> <Text>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount === 1 ? '' : 's'} left
</Text> </Text>
<DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton> <DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton>
</Stack> </Stack>

View File

@@ -15,7 +15,7 @@ const TodoFooter = (props: TodoFooterProps) => {
return ( return (
<Stack horizontal horizontalAlign="space-between"> <Stack horizontal horizontalAlign="space-between">
<Text> <Text>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount === 1 ? '' : 's'} left
</Text> </Text>
<DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton> <DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton>
</Stack> </Stack>

View File

@@ -16,7 +16,7 @@ export const TodoFooter = (props: TodoFooterProps) => {
return ( return (
<Stack horizontal horizontalAlign="space-between"> <Stack horizontal horizontalAlign="space-between">
<Text> <Text>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount === 1 ? '' : 's'} left
</Text> </Text>
<DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton> <DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton>
</Stack> </Stack>

View File

@@ -15,7 +15,7 @@ const TodoFooter = (props: TodoFooterProps) => {
return ( return (
<Stack horizontal horizontalAlign="space-between"> <Stack horizontal horizontalAlign="space-between">
<Text> <Text>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount === 1 ? '' : 's'} left
</Text> </Text>
<DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton> <DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton>
</Stack> </Stack>

View File

@@ -15,7 +15,7 @@ const TodoFooter = (props: TodoFooterProps) => {
return ( return (
<Stack horizontal horizontalAlign="space-between"> <Stack horizontal horizontalAlign="space-between">
<Text> <Text>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount === 1 ? '' : 's'} left
</Text> </Text>
<DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton> <DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton>
</Stack> </Stack>

View File

@@ -15,7 +15,7 @@ const TodoFooter = (props: TodoFooterProps) => {
return ( return (
<Stack horizontal horizontalAlign="space-between"> <Stack horizontal horizontalAlign="space-between">
<Text> <Text>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount === 1 ? '' : 's'} left
</Text> </Text>
<DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton> <DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton>
</Stack> </Stack>

View File

@@ -15,7 +15,7 @@ const TodoFooter = (props: TodoFooterProps) => {
return ( return (
<Stack horizontal horizontalAlign="space-between"> <Stack horizontal horizontalAlign="space-between">
<Text> <Text>
{itemCount} item{itemCount > 1 ? 's' : ''} left {itemCount} item{itemCount === 1 ? '' : 's'} left
</Text> </Text>
<DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton> <DefaultButton onClick={() => props.clear()}>Clear Completed</DefaultButton>
</Stack> </Stack>