Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/Dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Dropdown, Dropdown.Menu, and Dropdown.Item all get `COMMON` system props. Read o
| Name | Type | Default | Description |
| :- | :- | :-: | :- |
| direction | String | 'sw' | Sets the direction of the dropdown menu. |
| title | String | | Sets the text inside of the button |
| title | String or Node | | Sets the text inside of the button, can be either a string or a React node |

#### Dropdown.Item
No additional props.
Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ declare module '@primer/components' {

export interface DropdownMenuProps extends CommonProps, Omit<React.HTMLAttributes<HTMLUListElement>, 'color'> {
direction?: string
title: string
title: string | React.ReactNode
}

export const Dropdown: React.FunctionComponent<DropdownProps> & {
Expand Down
2 changes: 1 addition & 1 deletion src/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Dropdown.Item.propTypes = {
Dropdown.defaultProps = {theme}
Dropdown.propTypes = {
children: PropTypes.node,
title: PropTypes.string,
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
...COMMON.propTypes
}

Expand Down