Unverified Commit dbb33e1d authored by Tamika Tannis's avatar Tamika Tannis Committed by GitHub

Consolidate look&feel of request/feedback forms (#359)

parent c74346bd
......@@ -21,7 +21,7 @@ export class BugReportFeedbackForm extends AbstractFeedbackForm {
constructor(props) {
super(props);
}
renderCustom() {
return (
<form id={AbstractFeedbackForm.FORM_ID} onSubmit={ this.submitForm }>
......@@ -40,7 +40,7 @@ export class BugReportFeedbackForm extends AbstractFeedbackForm {
<textarea name="repro-steps" className="form-control" rows={5} required={ true }
maxLength={ 2000 } placeholder={REPRO_STEPS_PLACEHOLDER}/>
</div>
<button className="btn btn-default submit" type="submit">{SUBMIT_TEXT}</button>
<button className="btn btn-primary" type="submit">{SUBMIT_TEXT}</button>
</form>
);
}
......
......@@ -106,7 +106,7 @@ describe('BugReportFeedbackForm', () => {
it('renders submit button with correct props', () => {
expect(form.find('button').props()).toMatchObject({
className: 'btn btn-default submit',
className: 'btn btn-primary',
type: 'submit',
});
});
......
......@@ -19,7 +19,7 @@ export class RatingFeedbackForm extends AbstractFeedbackForm {
constructor(props) {
super(props);
}
renderCustom() {
const ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const radioButtonSet = ratings.map(rating => (
......@@ -46,7 +46,7 @@ export class RatingFeedbackForm extends AbstractFeedbackForm {
</div>
<textarea className="form-control form-group" name="comment" form={AbstractFeedbackForm.FORM_ID}
rows={ 8 } maxLength={ 2000 } placeholder={COMMENTS_PLACEHOLDER}/>
<button className="btn btn-default submit" type="submit">{SUBMIT_TEXT}</button>
<button className="btn btn-primary" type="submit">{SUBMIT_TEXT}</button>
</form>
);
}
......
......@@ -110,7 +110,7 @@ describe('RatingFeedbackForm', () => {
it('renders submit button with correct props as fourth child', () => {
expect(form.children().at(3).find('button').props()).toMatchObject({
className: 'btn btn-default submit',
className: 'btn btn-primary',
type: 'submit',
});
});
......
......@@ -21,7 +21,7 @@ export class RequestFeedbackForm extends AbstractFeedbackForm {
constructor(props) {
super(props);
}
renderCustom() {
return (
<form id={AbstractFeedbackForm.FORM_ID} onSubmit={ this.submitForm }>
......@@ -40,7 +40,7 @@ export class RequestFeedbackForm extends AbstractFeedbackForm {
<textarea name="value-prop" className="form-control" rows={5} required={ true }
maxLength={ 2000 } placeholder={PROPOSITION_PLACEHOLDER} />
</div>
<button className="btn btn-default submit" type="submit">{SUBMIT_TEXT}</button>
<button className="btn btn-primary" type="submit">{SUBMIT_TEXT}</button>
</form>
);
}
......
......@@ -106,7 +106,7 @@ describe('RequestFeedbackForm', () => {
it('renders submit button with correct props', () => {
expect(form.find('button').props()).toMatchObject({
className: 'btn btn-default submit',
className: 'btn btn-primary',
type: 'submit',
});
});
......
......@@ -80,9 +80,9 @@ export default class Feedback extends React.Component<FeedbackProps, FeedbackSta
this.state.isOpen &&
<div className="feedback-component">
<div className="feedback-header">
<div className="title">
{this.props.title.toUpperCase()}
</div>
<h3 className="title">
{this.props.title}
</h3>
<button type="button" className="btn btn-close" aria-label={BUTTON_CLOSE_TEXT} onClick={this.toggle} />
</div>
<div className="text-center">
......
......@@ -40,34 +40,22 @@
color: $text-primary;
.title {
color: $text-secondary;
flex-grow: 1;
font-size: 12px;
font-family: $font-family-header;
font-weight: $font-weight-header-regular;
height: 24px;
line-height: 32px;
}
.feedback-header {
display: flex;
margin-bottom: 8px;
.title {
flex-grow: 1;
}
button {
margin: auto 0;
}
}
.btn-group {
margin: 8px auto 16px;
}
.submit {
float: right;
margin-top: 16px;
}
.submit:hover {
background-color: $gray-lighter;
}
.radio-set {
display: flex;
margin-top: 8px;
......
......@@ -120,7 +120,7 @@ describe('Feedback', () => {
button = header.children().at(1);
});
it('renders correct title', () => {
expect(title.text()).toEqual(props.title.toUpperCase());
expect(title.text()).toEqual(props.title);
});
it('renders close button with correct props', () => {
......
......@@ -22,6 +22,10 @@
.request-header {
display: flex;
button {
margin: auto 0;
}
}
.select-label {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment