Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to include dropDownClassName="dropdown--full-width" #1872

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
1 change: 1 addition & 0 deletions frontend/public/components/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ $dropdown-background--hover: $color-pf-black-200; // pf-c-dropdown__menu-item--h
.dropdown--full-width {
&,
.pf-c-dropdown__toggle {
justify-content: space-between;
width: 100%;
}
}
Expand Down
8 changes: 7 additions & 1 deletion frontend/public/components/source-to-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,13 @@ class BuildSource extends React.Component<BuildSourceProps, BuildSourceState> {
</div>
<div className="form-group">
<label className="control-label co-required" htmlFor="tag">Version</label>
<Dropdown items={tagOptions} selectedKey={selectedTag} title={tagOptions[selectedTag]} onChange={this.onTagChange} id="tag" />
<Dropdown
dropDownClassName="dropdown--full-width"
items={tagOptions}
selectedKey={selectedTag}
title={tagOptions[selectedTag]}
onChange={this.onTagChange}
id="tag" />
</div>
<div className="form-group">
<label className="control-label co-required" htmlFor="name">Name</label>
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/components/utils/dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ export class Dropdown extends DropdownMixin {

//pf4 markup
return (<div className={className} ref={this.dropdownElement} style={this.props.style}>
<div className={classNames({'dropdown pf-c-dropdown': true, 'pf-m-expanded': this.state.active})}>
<div className={classNames({'dropdown pf-c-dropdown': true, 'pf-m-expanded': this.state.active}, dropDownClassName)}>
<button aria-haspopup="true" aria-expanded={this.state.active} className={classNames('pf-c-dropdown__toggle', buttonClassName)} onClick={this.toggle} onKeyDown={this.onKeyDown} type="button" id={this.props.id} aria-describedby={describedBy} >
<span className="pf-c-dropdown__toggle-text">
{titlePrefix && <span className="btn-link__titlePrefix">{titlePrefix}: </span>}
Expand Down