mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
M: Fix TSDoc text
This commit is contained in:
parent
9c336e324b
commit
678079192a
|
@ -19,7 +19,7 @@ interface ButtonProps extends CProps.Control, CProps.Colors, CProps.Button {
|
|||
}
|
||||
|
||||
/**
|
||||
* Button component that provides a customizable `button` with text, icon, tooltips and various styles.
|
||||
* Customizable `button` with text, icon, tooltips and various styles.
|
||||
*/
|
||||
function Button({
|
||||
icon,
|
||||
|
|
|
@ -21,7 +21,7 @@ export interface CheckboxProps extends Omit<CProps.Button, 'value' | 'onClick'>
|
|||
}
|
||||
|
||||
/**
|
||||
* Checkbox component that allows users to toggle a boolean value.
|
||||
* Component that allows toggling a boolean value.
|
||||
*/
|
||||
function Checkbox({
|
||||
disabled,
|
||||
|
|
|
@ -16,7 +16,7 @@ export interface CheckboxTristateProps extends Omit<CheckboxProps, 'value' | 'se
|
|||
}
|
||||
|
||||
/**
|
||||
* CheckboxTristate component that allows toggling among three states: `true`, `false`, and `null`.
|
||||
* Component that allows toggling among three states: `true`, `false`, and `null`.
|
||||
*/
|
||||
function CheckboxTristate({
|
||||
disabled,
|
||||
|
|
|
@ -11,7 +11,7 @@ export interface DividerProps extends CProps.Styling {
|
|||
}
|
||||
|
||||
/**
|
||||
* Divider component that renders a horizontal or vertical divider with customizable margins and styling.
|
||||
* Horizontal or vertical divider with customizable margins and styling.
|
||||
*/
|
||||
function Divider({ vertical, margins = 'mx-2', className, ...restProps }: DividerProps) {
|
||||
return (
|
||||
|
|
|
@ -17,7 +17,7 @@ interface DropdownProps extends CProps.Styling {
|
|||
}
|
||||
|
||||
/**
|
||||
* Dropdown animated component that displays a list of children with optional positioning and visibility control.
|
||||
* Animated list of children with optional positioning and visibility control.
|
||||
*/
|
||||
function Dropdown({
|
||||
isOpen,
|
||||
|
|
|
@ -18,7 +18,7 @@ interface DropdownButtonProps extends CProps.AnimatedButton {
|
|||
}
|
||||
|
||||
/**
|
||||
* DropdownButton animated component that renders a `button` with optional text, icon, and click functionality.
|
||||
* Animated `button` with optional text, icon, and click functionality.
|
||||
* It supports optional children for custom content or the default text/icon display.
|
||||
*/
|
||||
function DropdownButton({
|
||||
|
|
|
@ -5,7 +5,7 @@ import { animateDropdownItem } from '@/styling/animations';
|
|||
|
||||
import Checkbox, { CheckboxProps } from './Checkbox';
|
||||
|
||||
/** DropdownCheckbox animated component that renders a {@link Checkbox} inside a {@link Dropdown} item. */
|
||||
/** Animated {@link Checkbox} inside a {@link Dropdown} item. */
|
||||
function DropdownCheckbox({ setValue, disabled, ...restProps }: CheckboxProps) {
|
||||
return (
|
||||
<motion.div
|
||||
|
|
|
@ -6,7 +6,7 @@ import { animateDropdownItem } from '@/styling/animations';
|
|||
import { DividerProps } from './Divider';
|
||||
|
||||
/**
|
||||
* DropdownDivider component that renders {@link Divider} with animation inside {@link Dropdown}.
|
||||
* {@link Divider} with animation inside {@link Dropdown}.
|
||||
*/
|
||||
function DropdownDivider({ vertical, margins = 'mx-2', className, ...restProps }: DividerProps) {
|
||||
return (
|
||||
|
|
|
@ -10,7 +10,7 @@ interface EmbedYoutubeProps {
|
|||
}
|
||||
|
||||
/**
|
||||
* EmbedYoutube component that embeds a YouTube video into the page using the given video ID and dimensions.
|
||||
* Embeds a YouTube video into the page using the given video ID and dimensions.
|
||||
*/
|
||||
function EmbedYoutube({ videoID, pxHeight, pxWidth }: EmbedYoutubeProps) {
|
||||
if (!pxWidth) {
|
||||
|
|
|
@ -20,7 +20,7 @@ interface FileInputProps extends Omit<CProps.Input, 'accept' | 'type'> {
|
|||
}
|
||||
|
||||
/**
|
||||
* FileInput component for selecting a `file`, displaying the selected file name.
|
||||
* FileInput is a component for selecting a `file`, displaying the selected file name.
|
||||
*/
|
||||
function FileInput({ id, label, acceptType, title, className, style, onChange, ...restProps }: FileInputProps) {
|
||||
const inputRef = useRef<HTMLInputElement | null>(null);
|
||||
|
|
|
@ -3,7 +3,7 @@ import clsx from 'clsx';
|
|||
import { CProps } from '../props';
|
||||
|
||||
/**
|
||||
* FlexColumn component that renders a `flex` column container.
|
||||
* `flex` column container.
|
||||
* This component is useful for creating vertical layouts with flexbox.
|
||||
*/
|
||||
function FlexColumn({ className, children, ...restProps }: CProps.Div) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Reexporting reagraph types to wrap in 'use client'.
|
||||
// Reexporting necessary reagraph types.
|
||||
'use client';
|
||||
|
||||
import { GraphCanvas as GraphUI } from 'reagraph';
|
||||
|
|
|
@ -13,7 +13,7 @@ interface IndicatorProps extends CProps.Titled, CProps.Styling {
|
|||
}
|
||||
|
||||
/**
|
||||
* Indicator component that displays a status `icon` with a tooltip.
|
||||
* Displays a status `icon` with a tooltip.
|
||||
*/
|
||||
function Indicator({ icon, title, titleHtml, hideTitle, noPadding, className, ...restProps }: IndicatorProps) {
|
||||
return (
|
||||
|
|
|
@ -3,9 +3,15 @@ import clsx from 'clsx';
|
|||
import { CProps } from '../props';
|
||||
|
||||
interface LabelProps extends CProps.Label {
|
||||
/** Text to display. */
|
||||
text?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a label with optional text.
|
||||
*
|
||||
* Note: Html label component is used only if `htmlFor` prop is set.
|
||||
*/
|
||||
function Label({ text, className, ...restProps }: LabelProps) {
|
||||
if (!text) {
|
||||
return null;
|
||||
|
|
|
@ -7,6 +7,7 @@ import { assertIsNode } from '@/utils/utils';
|
|||
function useClickedOutside({ ref, callback }: { ref: React.RefObject<HTMLElement>; callback?: () => void }) {
|
||||
useEffect(() => {
|
||||
function handleClickOutside(event: MouseEvent) {
|
||||
console.log(1);
|
||||
assertIsNode(event.target);
|
||||
if (ref.current && !ref.current.contains(event.target)) {
|
||||
if (callback) callback();
|
||||
|
|
Loading…
Reference in New Issue
Block a user