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

Adding info tip for branch selection and updated default drop down text #227

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -72,32 +72,41 @@ export default class Domain extends Component {

render() {
return (
<label className={styles.Domain}>
<Infotip className={styles.Infotip}>
Enter the domain root. Do not include protocol (eg. http) or trailing
slash. For example, if your domain is example.com, you'll enter
example.com.
</Infotip>
<div className={styles.DomainInput}>
<Input
name="domain"
placeholder="Set a custom domain"
value={this.state.domain}
onChange={evt => {
this.setState({
domain: evt.target.value
})
}}
<section className={styles.Domain}>
<div>
<Infotip className={styles.Infotip}>
Enter the domain root. Do not include protocol (eg. http) or
trailing slash. For example, if your domain is example.com, you'll
enter example.com.
</Infotip>
<div className={styles.DomainInput}>
<Input
name="domain"
placeholder="Set a custom domain"
value={this.state.domain}
onChange={evt => {
this.setState({
domain: evt.target.value
})
}}
/>
</div>
</div>
<div>
<Infotip className={styles.Infotip}>
Dev: Preview content <br />
Live: Published production content
</Infotip>
<DropDownFieldType
defaultOptText="- select a branch -"
name="branch"
onChange={this.selectBranch}
selection={this.branches.find(
branch => branch.value === this.state.domainBranch
)}
options={this.branches}
/>
</div>
<DropDownFieldType
name="branch"
onChange={this.selectBranch}
selection={this.branches.filter(
branch => branch.value === this.state.domainBranch
)}
options={this.branches}
/>
<Button
className={styles.Button}
data-test="saveDomain"
Expand All @@ -108,7 +117,7 @@ export default class Domain extends Component {
<i className="fa fa-plus" aria-hidden="true" />
Add domain
</Button>
</label>
</section>
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
position: relative;

.Infotip {
position: absolute;
top: 0;
left: 0;
margin-bottom: 8px;
display: inline-block;
}

.DomainInput {
input {
display: block;
Expand Down Expand Up @@ -48,5 +48,6 @@

.Button {
width: 135px;
align-self: end;
}
}