Simplify Composer buttons (#7678)
* Render a CollapsibleButton's children (needed by UploadButton) * Make UploadButton ready to live inside an overflow menu * Always show overflow menu in composer: main buttons are emoji and attach * Re-order composer buttons as per design * Re-word composer button captions to be simple nouns * Don't rotate More options button when clicked * Move the composer menu and dialogs 16px in from right * Reduce shadow on composer More menu * From review: remove else clause * From review: take input out of button * Update test snapshots * Update snapshots
This commit is contained in:
parent
c011fb7475
commit
f5226f9d5b
7 changed files with 110 additions and 98 deletions
|
@ -25,7 +25,7 @@ interface ICollapsibleButtonProps extends ComponentProps<typeof MenuItem> {
|
|||
title: string;
|
||||
}
|
||||
|
||||
export const CollapsibleButton = ({ title, className, ...props }: ICollapsibleButtonProps) => {
|
||||
export const CollapsibleButton = ({ title, children, className, ...props }: ICollapsibleButtonProps) => {
|
||||
const inOverflowMenu = !!useContext(OverflowMenuContext);
|
||||
if (inOverflowMenu) {
|
||||
return <MenuItem
|
||||
|
@ -33,10 +33,17 @@ export const CollapsibleButton = ({ title, className, ...props }: ICollapsibleBu
|
|||
className={classNames("mx_CallContextMenu_item", className)}
|
||||
>
|
||||
{ title }
|
||||
{ children }
|
||||
</MenuItem>;
|
||||
}
|
||||
|
||||
return <AccessibleTooltipButton {...props} title={title} className={className} />;
|
||||
return <AccessibleTooltipButton
|
||||
{...props}
|
||||
title={title}
|
||||
className={className}
|
||||
>
|
||||
{ children }
|
||||
</AccessibleTooltipButton>;
|
||||
};
|
||||
|
||||
export default CollapsibleButton;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue