mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
ScrollDialog error handling
This commit is contained in:
parent
bfc779745a
commit
a977c73449
5 changed files with 42 additions and 11 deletions
|
@ -12,6 +12,7 @@ interface IProps {
|
|||
width?: number;
|
||||
onOverlayClick?: MouseEventHandler<HTMLDivElement>;
|
||||
onRefCapture?: (ref: any) => void;
|
||||
error?: string;
|
||||
|
||||
top_sticky?: ReactChild;
|
||||
top_sticky_offset?: number;
|
||||
|
@ -24,7 +25,7 @@ const ScrollDialog: FC<IProps> = ({
|
|||
width = 800,
|
||||
top_sticky,
|
||||
top_sticky_offset,
|
||||
|
||||
error,
|
||||
onOverlayClick,
|
||||
onRefCapture
|
||||
}) => {
|
||||
|
@ -94,6 +95,8 @@ const ScrollDialog: FC<IProps> = ({
|
|||
{!!buttons && (
|
||||
<div className={styles.bottom}>
|
||||
<div className={styles.wrap} style={{ flexBasis: width }}>
|
||||
<div className={classNames(styles.error, { active: error })}>{error}</div>
|
||||
|
||||
<div className={styles.pan}>{buttons}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -102,7 +105,7 @@ const ScrollDialog: FC<IProps> = ({
|
|||
<div
|
||||
className={styles.scroll_wrap}
|
||||
style={{ flexBasis: width + 40 }}
|
||||
// style={{ flexBasis: width }}
|
||||
// style={{ flexBasis: width }}
|
||||
>
|
||||
<Scroll
|
||||
className="dialog_scroll"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue