Skip to content

Commit fb5b3e1

Browse files
author
Eric Olkowski
committed
Updated role prop type to generic string
1 parent 435e3b5 commit fb5b3e1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/react-core/src/components/Divider/Divider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface DividerProps extends React.HTMLProps<HTMLElement> {
3232
'2xl'?: 'vertical' | 'horizontal';
3333
};
3434
/** The ARIA role of the divider when the component property has a value other than "hr". */
35-
role?: 'separator' | 'presentation';
35+
role?: string;
3636
}
3737

3838
export const Divider: React.FunctionComponent<DividerProps> = ({

packages/react-core/src/components/Toolbar/ToolbarItem.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ export const ToolbarItem: React.FunctionComponent<ToolbarItemProps> = ({
188188
...props
189189
}: ToolbarItemProps) => {
190190
if (variant === ToolbarItemVariant.separator) {
191+
// TODO: consider removing spread props here so we can update Divider role prop to union of
192+
// separator or presentation rather than generic string
191193
return <Divider className={css(className)} orientation={{ default: 'vertical' }} {...props} />;
192194
}
193195

0 commit comments

Comments
 (0)