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

fix: Prevent radio criterion shrinking and improve vertical alignment #370

Merged
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
3 changes: 2 additions & 1 deletion src/containers/CriterionContainer/RadioCriterion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ export class RadioCriterion extends React.Component {
<Form.RadioSet name={config.name} value={data}>
{config.options.map((option) => (
<Form.Radio
className="criteria-option"
className="criteria-option align-items-center"
key={option.name}
value={option.name}
description={intl.formatMessage(messages.optionPoints, { points: option.points })}
onChange={this.onChange}
disabled={!isGrading}
style={{ flexShrink: 0 }}
>
{option.label}
</Form.Radio>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,31 @@ exports[`Radio Criterion Container snapshot is grading 1`] = `
value="selected radio option"
>
<Form.Radio
className="criteria-option"
className="criteria-option align-items-center"
description="1 points"
disabled={false}
key="option name"
onChange={[Function]}
style={
{
"flexShrink": 0,
}
}
value="option name"
>
this label
</Form.Radio>
<Form.Radio
className="criteria-option"
className="criteria-option align-items-center"
description="2 points"
disabled={false}
key="option name 2"
onChange={[Function]}
style={
{
"flexShrink": 0,
}
}
value="option name 2"
>
this label 2
Expand All @@ -34,21 +44,31 @@ exports[`Radio Criterion Container snapshot is not grading 1`] = `
value="selected radio option"
>
<Form.Radio
className="criteria-option"
className="criteria-option align-items-center"
description="1 points"
disabled={true}
key="option name"
onChange={[Function]}
style={
{
"flexShrink": 0,
}
}
value="option name"
>
this label
</Form.Radio>
<Form.Radio
className="criteria-option"
className="criteria-option align-items-center"
description="2 points"
disabled={true}
key="option name 2"
onChange={[Function]}
style={
{
"flexShrink": 0,
}
}
value="option name 2"
>
this label 2
Expand All @@ -62,21 +82,31 @@ exports[`Radio Criterion Container snapshot radio contain invalid response 1`] =
value="selected radio option"
>
<Form.Radio
className="criteria-option"
className="criteria-option align-items-center"
description="1 points"
disabled={false}
key="option name"
onChange={[Function]}
style={
{
"flexShrink": 0,
}
}
value="option name"
>
this label
</Form.Radio>
<Form.Radio
className="criteria-option"
className="criteria-option align-items-center"
description="2 points"
disabled={false}
key="option name 2"
onChange={[Function]}
style={
{
"flexShrink": 0,
}
}
value="option name 2"
>
this label 2
Expand Down
Loading