2023-12-18 19:42:27 +03:00
|
|
|
// =========== Module contains interfaces for common UI elements. ==========
|
2023-12-25 16:53:27 +03:00
|
|
|
import { HTMLMotionProps } from 'framer-motion';
|
|
|
|
|
2023-12-18 19:42:27 +03:00
|
|
|
export namespace CProps {
|
2023-12-28 14:04:44 +03:00
|
|
|
export type Control = {
|
|
|
|
title?: string;
|
|
|
|
disabled?: boolean;
|
|
|
|
noBorder?: boolean;
|
|
|
|
noOutline?: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Styling = {
|
|
|
|
style?: React.CSSProperties;
|
|
|
|
className?: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Editor = Control & {
|
|
|
|
label?: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Colors = {
|
|
|
|
colors?: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Div = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
|
|
export type Button = Omit<
|
|
|
|
React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>,
|
|
|
|
'children' | 'type'
|
|
|
|
>;
|
|
|
|
export type Label = Omit<
|
|
|
|
React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>,
|
|
|
|
'children'
|
|
|
|
>;
|
|
|
|
export type TextArea = React.DetailedHTMLProps<
|
|
|
|
React.TextareaHTMLAttributes<HTMLTextAreaElement>,
|
|
|
|
HTMLTextAreaElement
|
|
|
|
>;
|
|
|
|
export type Input = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
|
|
|
|
|
|
export type AnimatedButton = Omit<HTMLMotionProps<'button'>, 'type'>;
|
2024-01-06 03:15:02 +03:00
|
|
|
export type AnimatedDiv = HTMLMotionProps<'div'>;
|
2023-12-18 19:42:27 +03:00
|
|
|
}
|