Skip to content

Commit

Permalink
Fixes eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwuzw committed Apr 12, 2024
1 parent fcd32de commit 9dc1f9c
Showing 1 changed file with 22 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,23 @@ function AccessibilityExpandedExample(): React.Node {
);
}

function AccessibilityTextInputWithArialabelledByAttributeExample(): React.Node {
const theme = React.useContext(RNTesterThemeContext);
return (
<View>
<Text
nativeID="testAriaLabelledBy"
style={{color: theme.SecondaryLabelColor}}>
Phone Number
</Text>
<TextInput
aria-labelledby={'testAriaLabelledBy'}
style={styles.default}
/>
</View>
);
}

exports.title = 'Accessibility';
exports.documentationURL = 'https://reactnative.dev/docs/accessibilityinfo';
exports.description = 'Examples of using Accessibility APIs.';
Expand Down Expand Up @@ -1876,25 +1893,11 @@ exports.examples = [
},
},
{
title: 'TextInput with aria-labelledby attribute"',
render(): React.Element<typeof View> {
return (
<RNTesterThemeContext.Consumer>
{theme => (
<View>
<Text
nativeID="testAriaLabelledBy"
style={{color: theme.SecondaryLabelColor}}>
Phone Number
</Text>
<TextInput
aria-labelledby={'testAriaLabelledBy'}
style={styles.default}
/>
</View>
)}
</RNTesterThemeContext.Consumer>
);
title: 'TextInput with aria-labelledby attribute',
render(): React.Element<
typeof AccessibilityTextInputWithArialabelledByAttributeExample,
> {
return <AccessibilityTextInputWithArialabelledByAttributeExample />;
},
},
];

0 comments on commit 9dc1f9c

Please sign in to comment.