Skip to content

Commit 3087929

Browse files
authored
chore(Badge): Add accessible prop (#419)
## Short description This pull request is adding an `accessible` prop to the `Badge` type and updating the component to use this new prop ## List of changes proposed in this pull request - Updated the `View` component within `Badge` to use the new `accessible` prop instead of a hardcoded value. ## How to test N/A
1 parent b9d81f5 commit 3087929

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/badge/Badge.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export type Badge = WithTestID<{
3636
text: string;
3737
allowFontScaling?: boolean;
3838
variant: "default" | "warning" | "error" | "success" | "cgn" | "highlight";
39+
accessible?: boolean;
3940
}>;
4041

4142
type SolidVariantProps = {
@@ -75,6 +76,7 @@ export const Badge = ({
7576
outline = false,
7677
allowFontScaling = true,
7778
variant,
79+
accessible = true,
7880
testID
7981
}: Badge) => {
8082
const { dynamicFontScale } = useIOFontDynamicScale();
@@ -206,7 +208,7 @@ export const Badge = ({
206208

207209
return (
208210
<View
209-
accessible={true}
211+
accessible={accessible}
210212
testID={testID}
211213
style={[
212214
styles.badge,

0 commit comments

Comments
 (0)