Files
cosmos-explorer/src/Explorer/Panes/PanelFooterComponent.tsx
v-darkora 0eaa5d004b [Query Copilot] Pin panel footer to the bottom, remove gap between panel and console (#1511)
* Move footer when save button is enabled to the bottom, remove gap between notification console and right panel

* Change the way panel height is calculated

* Remove unnecessary operator

* Change condition

* Fix snapshot

* Update panel height after animation ends and use different css for showing save button to the bottom of the page

* Fix ts compile
2023-07-07 09:09:15 +02:00

25 lines
602 B
TypeScript

import { PrimaryButton } from "@fluentui/react";
import React, { CSSProperties } from "react";
export interface PanelFooterProps {
buttonLabel: string;
isButtonDisabled?: boolean;
style?: CSSProperties;
}
export const PanelFooterComponent: React.FunctionComponent<PanelFooterProps> = ({
buttonLabel,
isButtonDisabled,
style,
}: PanelFooterProps): JSX.Element => (
<div className="panelFooter" style={style}>
<PrimaryButton
type="submit"
id="sidePanelOkButton"
text={buttonLabel}
ariaLabel={buttonLabel}
disabled={!!isButtonDisabled}
/>
</div>
);