Skip to content

Commit

Permalink
Fix several warnings in example apps
Browse files Browse the repository at this point in the history
  • Loading branch information
maurobender committed Jan 26, 2023
1 parent 21e345d commit e570a23
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions example/src/components/CardExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const CardExample = () => (
rightActions={[
<IconButton
as={UIKitIcon}
key="more-button"
name="more-vertical-outline"
onPress={() => window.alert( 'more button pressed' )}
/>
Expand Down
8 changes: 4 additions & 4 deletions example/src/components/PaletteColorGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const PaletteColorGrid = () => {
<View style={styles.vspace} />
<VStack>
{textStyles.map( ( { color, label } ) => (
<Text variant="body-special" color={color}>{label}</Text>
<Text key={color} variant="body-special" color={color}>{label}</Text>
) )}
</VStack>

Expand All @@ -114,7 +114,7 @@ const PaletteColorGrid = () => {
<View style={styles.vspace} />
<HStack flexWrap='wrap'>
{backgroundPrimaryStyles.map( ( { color, label } ) => (
<Box bg={color} height={80} width={80} marginRight="2" marginBottom="2">
<Box key={color} bg={color} height={80} width={80} marginRight="2" marginBottom="2">
<Text variant="small" textAlign='center' color="white">{label}</Text>
</Box>
) )}
Expand All @@ -126,7 +126,7 @@ const PaletteColorGrid = () => {
<View style={styles.vspace} />
<HStack flexWrap='wrap'>
{backgroundSecondaryStyles.map( ( { color, label } ) => (
<Box bg={color} height={80} width={80} marginRight="2" marginBottom="2">
<Box key={color} bg={color} height={80} width={80} marginRight="2" marginBottom="2">
<Text variant="small" textAlign='center' color="text-primary">{label}</Text>
</Box>
) )}
Expand All @@ -138,7 +138,7 @@ const PaletteColorGrid = () => {
<View style={styles.vspace} />
<HStack flexWrap='wrap'>
{borderStyles.map( ( { color, label } ) => (
<Box borderColor={color} borderWidth="xs" height={80} width={80} marginRight="2" marginBottom="2">
<Box key={color} borderColor={color} borderWidth="xs" height={80} width={80} marginRight="2" marginBottom="2">
<Text variant="small" textAlign='center' color="text-primary">{label}</Text>
</Box>
) )}
Expand Down
1 change: 1 addition & 0 deletions web_example/src/components/CardExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const CardExample = () => (
rightActions={[
<IconButton
as={UIKitIcon}
key="more-button"
name="more-vertical-outline"
onPress={() => window.alert( 'more button pressed' )}
/>
Expand Down
8 changes: 4 additions & 4 deletions web_example/src/components/PaletteColorGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const PaletteColorGrid = () => {
<View style={styles.vspace} />
<VStack>
{textStyles.map( ( { color, label } ) => (
<Text variant="body-special" color={color}>{label}</Text>
<Text key={color} variant="body-special" color={color}>{label}</Text>
) )}
</VStack>

Expand All @@ -114,7 +114,7 @@ const PaletteColorGrid = () => {
<View style={styles.vspace} />
<HStack flexWrap='wrap'>
{backgroundPrimaryStyles.map( ( { color, label } ) => (
<Box bg={color} height="100px" width="100px" marginRight="2" marginBottom="2">
<Box key={color} bg={color} height="100px" width="100px" marginRight="2" marginBottom="2">
<Text variant="body" textAlign='center' color="white">{label}</Text>
</Box>
) )}
Expand All @@ -126,7 +126,7 @@ const PaletteColorGrid = () => {
<View style={styles.vspace} />
<HStack flexWrap='wrap'>
{backgroundSecondaryStyles.map( ( { color, label } ) => (
<Box bg={color} height="100px" width="100px" marginRight="2" marginBottom="2">
<Box key={color} bg={color} height="100px" width="100px" marginRight="2" marginBottom="2">
<Text variant="body" textAlign='center' color="text-primary">{label}</Text>
</Box>
) )}
Expand All @@ -138,7 +138,7 @@ const PaletteColorGrid = () => {
<View style={styles.vspace} />
<HStack flexWrap='wrap'>
{borderStyles.map( ( { color, label } ) => (
<Box borderColor={color} borderWidth="sm" height="100px" width="100px" marginRight="2" marginBottom="2">
<Box key={color} borderColor={color} borderWidth="sm" height="100px" width="100px" marginRight="2" marginBottom="2">
<Text variant="body" textAlign='center' color="text-primary">{label}</Text>
</Box>
) )}
Expand Down

0 comments on commit e570a23

Please sign in to comment.