Skip to content

Commit

Permalink
[Fix #62] Refactor CSS classes
Browse files Browse the repository at this point in the history
  • Loading branch information
LaChope committed Nov 5, 2021
1 parent 97dd0c8 commit 730bfd6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/Answer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ const Answer = (props) => {
const label = JsonldUtils.getLocalized(question[Constants.RDFS_LABEL], options.intl);

return (
<>
<div className="question-header">
{label}
{props.icons}
</>
</div>
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Question.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default class Question extends React.Component {
return (
<Accordion defaultActiveKey={!this.state.expanded ? label : undefined}>
<Card className="mb-3">
<Accordion.Toggle as={Card.Header} onClick={this._toggleCollapse} className={headerClassName}>
<Accordion.Toggle as={Card.Header} onClick={this._toggleCollapse} className={headerClassName + " question-header"}>
<h6 className="d-inline" id={question['@id']}>
{collapsible && this._renderCollapseToggle()}
{label}
Expand Down
11 changes: 10 additions & 1 deletion src/styles/s-forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,19 @@ input:disabled {
background-color: #e6f9fb;
}

.question-header {
display: flex;
align-items: center;
}

.question-header h6 {
margin: 0;
}

.icon-list-items {
display: flex;
padding-left: 0;
margin: auto;
margin: 0;
}

.icon-list-item {
Expand Down

0 comments on commit 730bfd6

Please sign in to comment.