-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef57abf
commit 3d7c44a
Showing
5 changed files
with
44 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 12 additions & 22 deletions
34
...s/WorkingLists/WorkingListsBase/TemplateMaintenance/ExistingTemplateContents.component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,30 @@ | ||
// @flow | ||
import * as React from 'react'; | ||
import { withStyles } from '@material-ui/core/styles'; | ||
import i18n from '@dhis2/d2-i18n'; | ||
import { Button, ModalTitle, ModalContent, ModalActions } from '@dhis2/ui'; | ||
|
||
const getStyles = () => ({ | ||
buttonContainer: { | ||
display: 'flex', | ||
justifyContent: 'space-between', | ||
}, | ||
}); | ||
import { Button, ButtonStrip, ModalActions, ModalContent, ModalTitle } from '@dhis2/ui'; | ||
|
||
type Props = { | ||
onSaveTemplate: () => void, | ||
onClose: () => void, | ||
classes: Object, | ||
}; | ||
|
||
const ExistingTemplateContentsPlain = (props: Props) => { | ||
const { onSaveTemplate, onClose, classes } = props; | ||
export const ExistingTemplateContents = (props: Props) => { | ||
const { onSaveTemplate, onClose } = props; | ||
return ( | ||
<React.Fragment> | ||
<ModalTitle>{i18n.t('Save')}</ModalTitle> | ||
<ModalContent /> | ||
<ModalActions | ||
className={classes.buttonContainer} | ||
> | ||
<Button onClick={onClose}> | ||
{i18n.t('Cancel')} | ||
</Button> | ||
<Button onClick={onSaveTemplate} primary> | ||
{i18n.t('Save')} | ||
</Button> | ||
<ModalActions> | ||
<ButtonStrip> | ||
<Button onClick={onClose}> | ||
{i18n.t('Cancel')} | ||
</Button> | ||
<Button onClick={onSaveTemplate} primary> | ||
{i18n.t('Save')} | ||
</Button> | ||
</ButtonStrip> | ||
</ModalActions> | ||
</React.Fragment> | ||
); | ||
}; | ||
|
||
export const ExistingTemplateContents = withStyles(getStyles)(ExistingTemplateContentsPlain); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters