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 {
|
|
|
|
|
|
|
|
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>;
|
|
|
|
|
2023-12-25 16:53:27 +03:00
|
|
|
export type AnimatedButton = Omit<HTMLMotionProps<'button'>, 'type'>;
|
|
|
|
|
2023-12-18 19:42:27 +03:00
|
|
|
}
|