mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-04 23:05:35 +00:00
* feat(Map): Add widget for comments. Refactor design of Signatures widget. Refactor a lot of code. Add Transition component in ui-kit. Sync versions of react. --------- Co-authored-by: Dmitry Popov <dmitriypopovsamara@gmail.com> Co-authored-by: achichenkov <aleksei.chichenkov@telleqt.ai>
32 lines
912 B
TypeScript
32 lines
912 B
TypeScript
import classes from './InfoDrawer.module.scss';
|
|
import { WithChildren, WithClassName, WithHTMLProps } from '@/hooks/Mapper/types/common.ts';
|
|
import clsx from 'clsx';
|
|
import React from 'react';
|
|
|
|
export type InfoDrawerProps = { title?: React.ReactNode; labelClassName?: string; rightSide?: boolean } & WithChildren &
|
|
WithClassName &
|
|
Omit<WithHTMLProps, 'title'>;
|
|
|
|
export const InfoDrawer = ({
|
|
title,
|
|
children,
|
|
className,
|
|
labelClassName,
|
|
rightSide,
|
|
...htmlProps
|
|
}: InfoDrawerProps) => {
|
|
return (
|
|
<div
|
|
className={clsx(classes.InfoDrawerRoot, 'text-xs pl-1', className, {
|
|
[classes.RightSide]: rightSide,
|
|
'flex flex-col items-end pr-1': rightSide,
|
|
'pl-1': !rightSide,
|
|
})}
|
|
{...htmlProps}
|
|
>
|
|
{title && <div className={clsx(classes.InfoDrawerLabel, 'text-neutral-400', labelClassName)}>{title}</div>}
|
|
<div>{children}</div>
|
|
</div>
|
|
);
|
|
};
|