Skip to content

Commit 1e7eba1

Browse files
committed
Fix lint and prettier errors
1 parent 69bca6c commit 1e7eba1

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

packages/rn-tester/js/examples/Image/ImageExample.js

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,21 @@ class VectorDrawableExample extends React.Component<
626626
}
627627
}
628628

629+
// [macOS add switch to toggle the value of the accessible prop
630+
const AccessibilityExample = () => {
631+
const [isAccessible, setIsAccessible] = React.useState(true);
632+
return (
633+
<>
634+
<View style={styles.switch}>
635+
<Text>Set acccessible:</Text>
636+
<Switch value={isAccessible} onValueChange={setIsAccessible} />
637+
</View>
638+
<Image accessible={isAccessible} source={fullImage} style={styles.base} />
639+
</>
640+
);
641+
};
642+
// macOS]
643+
629644
const fullImage: ImageSource = {
630645
uri: IMAGE2,
631646
};
@@ -1534,26 +1549,14 @@ exports.examples = [
15341549
);
15351550
},
15361551
},
1537-
// [macOS add switch to toggle the value of the accessible prop
1552+
// [macOS
15381553
{
15391554
title: 'Accessibility',
15401555
description:
15411556
('If the `accessible` (boolean) prop is set to True, the image will be indicated as an accessbility element. If the `accessible` (boolean) prop is set to False, the image will not be indicated as an accessbility element.': string),
15421557
render: function (): React.Node {
1543-
const [isAccessible, setIsAccessible] = React.useState(true);
1544-
return (
1545-
<>
1546-
<View style={styles.switch}>
1547-
<Text>Set acccessible:</Text>
1548-
<Switch
1549-
value={isAccessible}
1550-
onValueChange={setIsAccessible}
1551-
/>
1552-
</View>
1553-
<Image accessible={isAccessible} source={fullImage} style={styles.base} />
1554-
</>
1555-
);
1556-
}
1558+
return <AccessibilityExample />;
1559+
},
15571560
},
15581561
// macOS]
15591562
{

0 commit comments

Comments
 (0)