Skip to content

Commit

Permalink
wip resolving lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pirupius committed Apr 4, 2024
1 parent 209bdbb commit a41c9a4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export interface OHRIFormField {
required?: boolean;
unspecified?: boolean;
disabled?: boolean;
readonly?: string | boolean;
readonly?: boolean;
inlineRendering?: 'single-line' | 'multiline' | 'automatic';
validators?: Array<Record<string, any>>;
behaviours?: Array<Record<string, any>>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ export const OHRIContentSwitcher: React.FC<OHRIFormFieldProps> = ({ question, on
) : (
!question.isHidden && (
<FormGroup legendText={question.label} className={errors.length ? styles.errorLegend : styles.boldedLegend}>
<ContentSwitcher onChange={handleChange} selectedIndex={selectedIndex} className={styles.selectedOption}>
<ContentSwitcher
onChange={handleChange}
selectedIndex={selectedIndex}
className={styles.selectedOption}
size="md">
{question.questionOptions.answers.map((option, index) => (
<Switch
name={option.concept || option.value}
Expand Down
2 changes: 1 addition & 1 deletion src/components/inputs/number/ohri-number.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const OHRINumber: React.FC<OHRIFormFieldProps> = ({ question, onChange, handler,
className={`${styles.controlWidthConstrained} ${isFieldRequiredError ? styles.errorLabel : styles.boldedLabel}`}
warn={warnings.length > 0}
warnText={warnings[0]?.message}
step="0.01"
step={0.01}
/>
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions src/utils/ohri-form-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export function isInlineView(

export function evaluateFieldReadonlyProp(
field: OHRIFormField,
sectionReadonly: string | boolean,
pageReadonly: string | boolean,
formReadonly: string | boolean,
sectionReadonly: boolean,
pageReadonly: boolean,
formReadonly: boolean,
) {
if (!isEmpty(field.readonly)) {
return;
Expand Down

0 comments on commit a41c9a4

Please sign in to comment.