Add done button to UsernameLinkModalBody
This commit is contained in:
parent
0273e1ac1d
commit
b7b725f74c
5 changed files with 22 additions and 0 deletions
|
@ -6583,6 +6583,10 @@
|
||||||
"messageformat": "Reset",
|
"messageformat": "Reset",
|
||||||
"description": "Text of button at the bottom of the username link modal"
|
"description": "Text of button at the bottom of the username link modal"
|
||||||
},
|
},
|
||||||
|
"icu:UsernameLinkModalBody__done": {
|
||||||
|
"messageformat": "Done",
|
||||||
|
"description": "Text of button at the bottom of the username link modal"
|
||||||
|
},
|
||||||
"icu:UsernameLinkModalBody__color__radio": {
|
"icu:UsernameLinkModalBody__color__radio": {
|
||||||
"messageformat": "Username link color, {index, number} of {total, number}",
|
"messageformat": "Username link color, {index, number} of {total, number}",
|
||||||
"description": "ARIA label of button for selecting username link color"
|
"description": "ARIA label of button for selecting username link color"
|
||||||
|
|
|
@ -247,6 +247,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__done {
|
||||||
|
width: 100%;
|
||||||
|
margin-block-end: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
&__colors {
|
&__colors {
|
||||||
&__grid {
|
&__grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|
|
@ -535,6 +535,7 @@ export function ProfileEditor({
|
||||||
resetUsernameLink={resetUsernameLink}
|
resetUsernameLink={resetUsernameLink}
|
||||||
saveAttachment={saveAttachment}
|
saveAttachment={saveAttachment}
|
||||||
showToast={showToast}
|
showToast={showToast}
|
||||||
|
onBack={() => setEditState(EditState.None)}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else if (editState === EditState.None) {
|
} else if (editState === EditState.None) {
|
||||||
|
|
|
@ -55,6 +55,7 @@ export default {
|
||||||
showToast: { action: true },
|
showToast: { action: true },
|
||||||
resetUsernameLink: { action: true },
|
resetUsernameLink: { action: true },
|
||||||
setUsernameLinkColor: { action: true },
|
setUsernameLinkColor: { action: true },
|
||||||
|
onBack: { action: true },
|
||||||
},
|
},
|
||||||
} as Meta;
|
} as Meta;
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ export type PropsType = Readonly<{
|
||||||
resetUsernameLink: () => void;
|
resetUsernameLink: () => void;
|
||||||
saveAttachment: SaveAttachmentActionCreatorType;
|
saveAttachment: SaveAttachmentActionCreatorType;
|
||||||
showToast: ShowToastAction;
|
showToast: ShowToastAction;
|
||||||
|
onBack: () => void;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
export type ColorMapEntryType = Readonly<{
|
export type ColorMapEntryType = Readonly<{
|
||||||
|
@ -492,6 +493,8 @@ export function UsernameLinkModalBody({
|
||||||
resetUsernameLink,
|
resetUsernameLink,
|
||||||
saveAttachment,
|
saveAttachment,
|
||||||
showToast,
|
showToast,
|
||||||
|
|
||||||
|
onBack,
|
||||||
}: PropsType): JSX.Element {
|
}: PropsType): JSX.Element {
|
||||||
const [pngData, setPngData] = useState<Uint8Array | undefined>();
|
const [pngData, setPngData] = useState<Uint8Array | undefined>();
|
||||||
const [showColors, setShowColors] = useState(false);
|
const [showColors, setShowColors] = useState(false);
|
||||||
|
@ -663,6 +666,14 @@ export function UsernameLinkModalBody({
|
||||||
>
|
>
|
||||||
{i18n('icu:UsernameLinkModalBody__reset')}
|
{i18n('icu:UsernameLinkModalBody__reset')}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
className={classnames(`${CLASS}__done`)}
|
||||||
|
variant={ButtonVariant.Primary}
|
||||||
|
onClick={onBack}
|
||||||
|
>
|
||||||
|
{i18n('icu:UsernameLinkModalBody__done')}
|
||||||
|
</Button>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue