-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #846 from JoinColony/ui/15529854-deletion-modal
feat: added deletion modal
- Loading branch information
Showing
7 changed files
with
162 additions
and
28 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
109 changes: 82 additions & 27 deletions
109
...ts/frame/v5/pages/UserAdvancedPage/partials/UserAdvancedSettings/UserAdvancedSettings.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
24 changes: 24 additions & 0 deletions
24
src/components/frame/v5/pages/UserAdvancedPage/partials/UserAdvancedSettings/consts.ts
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,24 @@ | ||
import { InformationListItemProps } from '~v5/shared/InformationList/types'; | ||
|
||
export const modalInformations: InformationListItemProps[] = [ | ||
{ | ||
title: { id: 'advancedSettings.delete.modal.info1' }, | ||
id: 'advancedSettings.delete.modal.info1', | ||
}, | ||
{ | ||
title: { id: 'advancedSettings.delete.modal.info2' }, | ||
id: 'advancedSettings.delete.modal.info2', | ||
}, | ||
{ | ||
title: { id: 'advancedSettings.delete.modal.info3' }, | ||
id: 'advancedSettings.delete.modal.info3', | ||
}, | ||
{ | ||
title: { id: 'advancedSettings.delete.modal.info4' }, | ||
id: 'advancedSettings.delete.modal.info4', | ||
}, | ||
{ | ||
title: { id: 'advancedSettings.delete.modal.info5' }, | ||
id: 'advancedSettings.delete.modal.info5', | ||
}, | ||
]; |
30 changes: 30 additions & 0 deletions
30
src/components/v5/shared/InformationList/InformationList.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,30 @@ | ||
import React, { FC } from 'react'; | ||
import { useIntl } from 'react-intl'; | ||
import clsx from 'clsx'; | ||
|
||
import { InformationListProps } from './types'; | ||
|
||
const displayName = 'v5.InformationList'; | ||
|
||
const InformationList: FC<InformationListProps> = ({ items, className }) => { | ||
const { formatMessage } = useIntl(); | ||
|
||
return ( | ||
<div | ||
className={clsx( | ||
className, | ||
'rounded border bg-negative-100 border-negative-400 p-[1.125rem] text-negative-400', | ||
)} | ||
> | ||
<ul className="text-sm list-disc pl-4"> | ||
{items.map(({ id, title }) => ( | ||
<li key={id}>{formatMessage(title)}</li> | ||
))} | ||
</ul> | ||
</div> | ||
); | ||
}; | ||
|
||
InformationList.displayName = displayName; | ||
|
||
export default InformationList; |
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 @@ | ||
export { default } from './InformationList'; |
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,11 @@ | ||
import { MessageDescriptor } from 'react-intl'; | ||
|
||
export interface InformationListItemProps { | ||
title: MessageDescriptor; | ||
id: string; | ||
} | ||
|
||
export interface InformationListProps { | ||
items: InformationListItemProps[]; | ||
className?: string; | ||
} |
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