Skip to content

Commit

Permalink
style: fix some styling
Browse files Browse the repository at this point in the history
  • Loading branch information
ekowidianto committed Mar 14, 2022
1 parent a463156 commit 08fe679
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const styles = {
},
flexChild: {
flex: 1,
marginLeft: 10,
},
toggle: {
marginTop: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ class TestCase extends Component {
error={!!test.getIn(['error', field])}
fullWidth
helperText={test.getIn(['error', field]) && placeholder}
InputLabelProps={{
shrink: true,
}}
multiline
name={TestCase.getTestInputName(this.props.type, field)}
onChange={(event) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ class ProgrammingQuestionForm extends Component {
label={(required ? '* ' : '') + label}
helperText={error}
id={ProgrammingQuestionForm.getInputId(field)}
InputLabelProps={{
shrink: true,
}}
name={ProgrammingQuestionForm.getInputName(field)}
onChange={(event) => {
this.handleChange(field, event.target.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import { questionTypes } from '../constants';

const styles = {
horizontalRule: {
marginTop: 40,
marginBottom: 40,
marginTop: 20,
marginBottom: 20,
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const styles = {
},
contineButton: {
backgroundColor: green[500],
labelColor: 'white',
color: 'white',
marginBottom: 10,
marginRight: 10,
},
Expand Down Expand Up @@ -177,16 +177,16 @@ class SubmissionEditStepForm extends Component {

renderContinueButton() {
const { intl } = this.props;
const disabled = this.shouldDisableContinueButton();
if (this.shouldRenderContinueButton()) {
return (
<Button
variant="contained"
disabled={this.shouldDisableContinueButton()}
disabled={disabled}
onClick={() => this.handleNext()}
style={{
...styles.formButton,
backgroundColor: green[500],
color: 'white',
...(!disabled && styles.contineButton),
}}
>
{intl.formatMessage(translations.continue)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class CourseDropdownMenu extends PureComponent {
<Select
disabled={disabled}
onChange={onChange}
value={selectedCourseId}
value={selectedCourseId || ''}
style={styles.dropDown}
{...dropDownMenuProps}
>
Expand Down
8 changes: 6 additions & 2 deletions client/app/bundles/course/group/components/GroupCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,12 @@ GroupCard.propTypes = {
titleButtons: PropTypes.arrayOf(groupCardTitleButtonShape),
bottomButtons: PropTypes.arrayOf(groupCardBottomButtonShape),
className: PropTypes.string,
children: PropTypes.oneOfType([PropTypes.array, PropTypes.element])
.isRequired,
children: PropTypes.oneOfType([
PropTypes.array,
PropTypes.element,
PropTypes.string,
PropTypes.object,
]).isRequired,
};

export default GroupCard;
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const styles = {
},
fields: {
marginTop: 0,
paddingTop: 0,
},
panelSummaryText: {
flexDirection: 'column',
Expand Down Expand Up @@ -189,7 +190,7 @@ class QuestionCard extends Component {
) : null}
</div>
</AccordionSummary>
<CardContent style={styles.field}>
<CardContent style={styles.fields}>
{QuestionCard.renderSpecificFields(question)}
</CardContent>
</Accordion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ const styles = {
button: {
marginRight: 15,
},
toggleContainer: {
paddingTop: 0,
paddingBottom: 0,
},
};

class SurveyDetails extends Component {
Expand Down Expand Up @@ -79,7 +83,7 @@ class SurveyDetails extends Component {
}

return (
<CardContent>
<CardContent style={styles.toggleContainer}>
<FormControlLabel
control={
<Switch
Expand Down
4 changes: 2 additions & 2 deletions client/app/lib/components/course/ConditionList/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ConditionList extends Component {
<TableCell colSpan="3">{condition.description}</TableCell>
<TableCell colSpan="2" style={styles.alignRight}>
<IconButton href={condition.edit_url}>
<Edit htmlColor="black" />
<Edit htmlColor="black" style={{ padding: 0 }} />
</IconButton>

<IconButton
Expand All @@ -93,7 +93,7 @@ class ConditionList extends Component {
style={styles.alignMiddle}
id={condition.delete_url}
>
<Delete htmlColor="black" />
<Delete htmlColor="black" style={{ padding: 0 }} />
</IconButton>
</TableCell>
</TableRow>
Expand Down

0 comments on commit 08fe679

Please sign in to comment.