Skip to content

Commit b307a82

Browse files
Tree: Allow label to be a node
This allows icons and formating with spans if it is needed.
1 parent f7d0ed4 commit b307a82

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/tree/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ const propTypes = {
7676
PropTypes.shape({
7777
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
7878
.isRequired,
79-
label: PropTypes.string.isRequired,
79+
label: PropTypes.oneOfType([PropTypes.node, PropTypes.string])
80+
.isRequired,
8081
type: PropTypes.string.isRequired,
8182
}),
8283
])

0 commit comments

Comments
 (0)