Skip to content

Commit

Permalink
fix(types): use AriaRole instead of string for role prop
Browse files Browse the repository at this point in the history
  • Loading branch information
dominiccarrington committed Oct 23, 2024
1 parent d46a7e8 commit 65babb8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/ButtonGroup/ButtonGroup.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CSSProperties, ReactElement } from 'react';
import { AriaRole, CSSProperties, ReactElement } from 'react';

import { ButtonCircleProps } from '../ButtonCircle';
import { ButtonPillProps } from '../ButtonPill';
Expand Down Expand Up @@ -59,7 +59,7 @@ export interface Props {
/**
* Role for adding accessibility
*/
role?: string;
role?: AriaRole;

/**
* Orientation of ButtonGroup
Expand Down
4 changes: 2 additions & 2 deletions src/components/ButtonSimple/ButtonSimple.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CSSProperties, ReactNode } from 'react';
import { AriaRole, CSSProperties, ReactNode } from 'react';
import { AriaButtonProps } from '@react-types/button';
import { HoverProps } from '@react-aria/interactions';

Expand Down Expand Up @@ -38,7 +38,7 @@ export interface Props extends AriaButtonProps, HoverProps {
/**
* Role for adding accessibility
*/
role?: string;
role?: AriaRole;

/**
* Tabindex for accessibility
Expand Down
4 changes: 2 additions & 2 deletions src/components/List/List.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CSSProperties, Dispatch, ReactNode, SetStateAction } from 'react';
import { AriaRole, CSSProperties, Dispatch, ReactNode, SetStateAction } from 'react';

export type ListOrientation = 'horizontal' | 'vertical';

Expand Down Expand Up @@ -36,7 +36,7 @@ export interface Props {
/**
* Aria role
*/
role?: string;
role?: AriaRole;

/**
* Determines if the onPress handler should also focus the selected item
Expand Down
4 changes: 2 additions & 2 deletions src/components/ListItemBase/ListItemBase.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CSSProperties, ReactNode } from 'react';
import { AriaRole, CSSProperties, ReactNode } from 'react';
import { PressEvents } from '@react-types/shared';
import { FocusProps, FocusWithinProps } from '@react-aria/interactions';

Expand Down Expand Up @@ -63,7 +63,7 @@ export interface Props
* Aria role
* @default "listitem"
*/
role?: string;
role?: AriaRole;

/**
* Indicates wether this item is currently focusable
Expand Down

0 comments on commit 65babb8

Please sign in to comment.