-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update license at settings page (#1115)
* feat: add license update to setting page * feat: update ui package * fix: use optional * feat: refactor licence components * fix: destructure item id and settings --------- Co-authored-by: Kim Lan Phan Hoang <[email protected]>
- Loading branch information
Showing
11 changed files
with
573 additions
and
216 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
42 changes: 42 additions & 0 deletions
42
src/components/item/publish/ConfirmLicenseDialogContent.tsx
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from 'react'; | ||
|
||
import { DialogActions, DialogContent, DialogContentText } from '@mui/material'; | ||
|
||
import { Button } from '@graasp/ui'; | ||
|
||
import { useBuilderTranslation } from '@/config/i18n'; | ||
import { BUILDER } from '@/langs/constants'; | ||
|
||
type Props = { | ||
handleSubmit: () => void; | ||
disableSubmission?: boolean; | ||
handleBack: () => void; | ||
}; | ||
|
||
const ConfirmLicenseDialogContent = ({ | ||
handleSubmit, | ||
disableSubmission, | ||
handleBack, | ||
}: Props): JSX.Element => { | ||
const { t: translateBuilder } = useBuilderTranslation(); | ||
|
||
return ( | ||
<> | ||
<DialogContent sx={{ paddingX: 3 }}> | ||
<DialogContentText> | ||
{translateBuilder(BUILDER.ITEM_SETTINGS_CC_LICENSE_MODAL_CONTENT)} | ||
</DialogContentText> | ||
</DialogContent> | ||
<DialogActions> | ||
<Button variant="text" onClick={handleBack}> | ||
{translateBuilder(BUILDER.BACK)} | ||
</Button> | ||
<Button onClick={handleSubmit} disabled={disableSubmission}> | ||
{translateBuilder(BUILDER.CONFIRM_BUTTON)} | ||
</Button> | ||
</DialogActions> | ||
</> | ||
); | ||
}; | ||
|
||
export default ConfirmLicenseDialogContent; |
Oops, something went wrong.