webapp/src/components/_shared/FloatingPanel/FloatingPanel.tsx
Arkadzi Rakouski 52d8a01a50
add floating panel for profile settings (#186)
* add floating panel for profile settings

* resolve conversation

* don't show beforeunload message after save profile form

---------

Co-authored-by: ilya-bkv <i.yablokov@ccmp.me>
2023-08-18 18:37:14 +02:00

36 lines
729 B
TypeScript

import { clsx } from 'clsx'
import { Button } from '../Button'
import styles from './FloatingPanel.module.scss'
type Props = {
isVisible: boolean
confirmTitle: string
confirmAction: () => void
declineTitle: string
declineAction: () => void
}
export default (props: Props) => {
return (
<div
class={clsx(styles.PanelWrapper, {
[styles.PanelWrapperVisible]: props.isVisible
})}
>
<Button
type="button"
size="L"
variant="bordered"
value={props.declineTitle}
onClick={() => {
props.declineAction()
}}
/>
<Button type="submit" size="L" value={props.confirmTitle} onClick={props.confirmAction} />
</div>
)
}