mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make label required in link components (#4844)

authored by

Eric Bailey and committed by
GitHub
43ba0f21 4437b9a5

+7 -9
+3
src/components/Button.tsx
··· 70 70 AccessibilityProps & 71 71 VariantProps & { 72 72 testID?: string 73 + /** 74 + * For a11y, try to make this descriptive and clear 75 + */ 73 76 label: string 74 77 style?: StyleProp<ViewStyle> 75 78 hoverStyle?: StyleProp<ViewStyle>
+4 -9
src/components/Link.tsx
··· 41 41 testID?: string 42 42 43 43 /** 44 - * Label for a11y. Defaults to the href. 45 - */ 46 - label?: string 47 - 48 - /** 49 44 * The React Navigation `StackAction` to perform when the link is pressed. 50 45 */ 51 46 action?: 'push' | 'replace' | 'navigate' ··· 197 192 } 198 193 199 194 export type LinkProps = Omit<BaseLinkProps, 'disableMismatchWarning'> & 200 - Omit<ButtonProps, 'onPress' | 'disabled' | 'label'> 195 + Omit<ButtonProps, 'onPress' | 'disabled'> 201 196 202 197 /** 203 198 * A interactive element that renders as a `<a>` tag on the web. On mobile it ··· 224 219 225 220 return ( 226 221 <Button 227 - label={href} 228 222 {...rest} 229 223 style={[a.justify_start, flatten(rest.style)]} 230 224 role="link" ··· 249 243 250 244 export type InlineLinkProps = React.PropsWithChildren< 251 245 BaseLinkProps & TextStyleProp & Pick<TextProps, 'selectable'> 252 - > 246 + > & 247 + Pick<ButtonProps, 'label'> 253 248 254 249 export function InlineLinkText({ 255 250 children, ··· 291 286 <Text 292 287 selectable={selectable} 293 288 accessibilityHint="" 294 - accessibilityLabel={label || href} 289 + accessibilityLabel={label} 295 290 {...rest} 296 291 style={[ 297 292 {color: t.palette.primary_500},