-
Notifications
You must be signed in to change notification settings - Fork 47k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test fixtures to cover disabled selected options
- Loading branch information
Showing
4 changed files
with
112 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const React = window.React; | ||
|
||
function csv(string) { | ||
return string.split(/\s*,\s*/); | ||
} | ||
|
||
export default function IssueList ({ issues }) { | ||
if (!issues) { | ||
return null; | ||
} | ||
|
||
if (typeof issues === 'string') { | ||
issues = csv(issues); | ||
} | ||
|
||
let links = issues.reduce((memo, issue, i) => { | ||
return memo.concat( | ||
i > 0 && i < issues.length ? ', ' : null, | ||
<a href={"https://github.com/facebook/react/issues/" + issue} key={issue}> | ||
{issue} | ||
</a> | ||
); | ||
}, []); | ||
|
||
return <span>{links}</span>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters