Merge pull request #458 from edx/aehsan/scroll_added_for_username_suggestion

scroll added for username suggestions
This commit is contained in:
Adeel Ehsan
2021-10-27 23:56:02 +05:00
committed by GitHub
2 changed files with 20 additions and 12 deletions

View File

@@ -862,3 +862,9 @@ select.form-control {
margin-bottom: 11%;
margin-left: 15px;
}
.scroll-suggested-username {
width: 21rem;
white-space: nowrap;
overflow-x: auto;
display: inline-flex;
}

View File

@@ -16,18 +16,20 @@ const UsernameField = (props) => {
const suggestedUsernames = () => (
<div className={className}>
<span className="text-gray username-suggestion-label">{intl.formatMessage(messages['registration.username.suggestion.label'])}</span>
{usernameSuggestions.map((username, index) => (
<Button
type="button"
name="username"
variant="outline-dark"
className="username-suggestion data-hj-suppress"
key={`suggestion-${index.toString()}`}
onClick={(e) => props.handleSuggestionClick(e, username)}
>
{username}
</Button>
))}
<div className="scroll-suggested-username">
{usernameSuggestions.map((username, index) => (
<Button
type="button"
name="username"
variant="outline-dark"
className="username-suggestion data-hj-suppress"
key={`suggestion-${index.toString()}`}
onClick={(e) => props.handleSuggestionClick(e, username)}
>
{username}
</Button>
))}
</div>
{iconButton}
</div>
);