Apply prettier formatting
This commit is contained in:
parent
1cac306093
commit
526645c791
1576 changed files with 65385 additions and 62478 deletions
|
@ -14,13 +14,13 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { ComponentProps, useContext } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import React, { ComponentProps, useContext } from "react";
|
||||
import classNames from "classnames";
|
||||
|
||||
import AccessibleTooltipButton from "../elements/AccessibleTooltipButton";
|
||||
import { MenuItem } from "../../structures/ContextMenu";
|
||||
import { OverflowMenuContext } from './MessageComposerButtons';
|
||||
import { IconizedContextMenuOption } from '../context_menus/IconizedContextMenu';
|
||||
import { OverflowMenuContext } from "./MessageComposerButtons";
|
||||
import { IconizedContextMenuOption } from "../context_menus/IconizedContextMenu";
|
||||
|
||||
interface ICollapsibleButtonProps extends ComponentProps<typeof MenuItem> {
|
||||
title: string;
|
||||
|
@ -30,18 +30,12 @@ interface ICollapsibleButtonProps extends ComponentProps<typeof MenuItem> {
|
|||
export const CollapsibleButton = ({ title, children, className, iconClassName, ...props }: ICollapsibleButtonProps) => {
|
||||
const inOverflowMenu = !!useContext(OverflowMenuContext);
|
||||
if (inOverflowMenu) {
|
||||
return <IconizedContextMenuOption
|
||||
{...props}
|
||||
iconClassName={iconClassName}
|
||||
label={title}
|
||||
/>;
|
||||
return <IconizedContextMenuOption {...props} iconClassName={iconClassName} label={title} />;
|
||||
}
|
||||
|
||||
return <AccessibleTooltipButton
|
||||
{...props}
|
||||
title={title}
|
||||
className={classNames(className, iconClassName)}
|
||||
>
|
||||
{ children }
|
||||
</AccessibleTooltipButton>;
|
||||
return (
|
||||
<AccessibleTooltipButton {...props} title={title} className={classNames(className, iconClassName)}>
|
||||
{children}
|
||||
</AccessibleTooltipButton>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue