Skip to content

Commit

Permalink
fix: use card as form-wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo committed Oct 1, 2024
1 parent 0cfce23 commit c6724a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/app/layout/Layout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
grid-area: main;
background-color: var(--colors-grey100);
width: 100%;
display: flex;
flex-direction: column;
}

.sidebar {
Expand Down
5 changes: 3 additions & 2 deletions src/components/form/DefaultFormContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ModelSection } from '../../types'
import { StandardFormSection, StandardFormActions } from '../standardForm'
import classes from './DefaultFormContents.module.css'
import { DefaultFormErrorNotice } from './DefaultFormErrorNotice'
import { Card } from '@dhis2/ui'

Check failure on line 10 in src/components/form/DefaultFormContents.tsx

View workflow job for this annotation

GitHub Actions / lint

`@dhis2/ui` import should occur before import of `react`

export function DefaultEditFormContents({
children,
Expand All @@ -24,13 +25,13 @@ export function DefaultEditFormContents({

return (
<>
<div className={classes.form}>
<Card className={classes.form}>
{children}

<StandardFormSection>
<DefaultFormErrorNotice />
</StandardFormSection>
</div>
</Card>
<div className={classes.formActions}>
<StandardFormActions
cancelLabel={i18n.t('Cancel')}
Expand Down

0 comments on commit c6724a0

Please sign in to comment.