diff --git a/rsconcept/frontend/src/components/Common/Button.tsx b/rsconcept/frontend/src/components/Common/Button.tsx index 0479c7b5..8496c5b5 100644 --- a/rsconcept/frontend/src/components/Common/Button.tsx +++ b/rsconcept/frontend/src/components/Common/Button.tsx @@ -1,9 +1,9 @@ import clsx from 'clsx'; -import { IColorsProps, IControlProps } from './commonInterfaces'; +import { CProps } from '../props'; interface ButtonProps -extends IControlProps, IColorsProps, Omit, 'children' | 'title'| 'type'> { +extends CProps.Control, CProps.Colors, CProps.Button { text?: string icon?: React.ReactNode @@ -12,7 +12,7 @@ extends IControlProps, IColorsProps, Omit diff --git a/rsconcept/frontend/src/components/Common/Checkbox.tsx b/rsconcept/frontend/src/components/Common/Checkbox.tsx index 0395cabe..609d2aa8 100644 --- a/rsconcept/frontend/src/components/Common/Checkbox.tsx +++ b/rsconcept/frontend/src/components/Common/Checkbox.tsx @@ -2,20 +2,20 @@ import clsx from 'clsx'; import { useMemo } from 'react'; import { CheckboxCheckedIcon } from '../Icons'; +import { CProps } from '../props'; import Label from './Label'; export interface CheckboxProps -extends Omit, 'children' | 'title' | 'value' | 'onClick' > { +extends Omit { label?: string disabled?: boolean - tooltip?: string value: boolean setValue?: (newValue: boolean) => void } function Checkbox({ - id, disabled, tooltip, label, + id, disabled, label, className, value, setValue, ...restProps }: CheckboxProps) { const cursor = useMemo( @@ -46,7 +46,6 @@ function Checkbox({ cursor, className )} - title={tooltip} disabled={disabled} onClick={handleClick} {...restProps} diff --git a/rsconcept/frontend/src/components/Common/ConceptSearch.tsx b/rsconcept/frontend/src/components/Common/ConceptSearch.tsx index 8bb67596..640ec6f4 100644 --- a/rsconcept/frontend/src/components/Common/ConceptSearch.tsx +++ b/rsconcept/frontend/src/components/Common/ConceptSearch.tsx @@ -1,18 +1,19 @@ import { BiSearchAlt2 } from 'react-icons/bi'; +import { CProps } from '../props'; import Overlay from './Overlay'; import TextInput from './TextInput'; -interface ConceptSearchProps { +interface ConceptSearchProps +extends CProps.Styling { value: string onChange?: (newValue: string) => void noBorder?: boolean - dimensions?: string } -function ConceptSearch({ value, onChange, noBorder, dimensions }: ConceptSearchProps) { +function ConceptSearch({ value, onChange, noBorder, ...restProps }: ConceptSearchProps) { return ( -
+
{ - className?: string - tooltip?: string +extends Omit { label?: string } -function ConceptTab({ label, tooltip, className, ...otherProps }: ConceptTabProps) { +function ConceptTab({ label, className, ...otherProps }: ConceptTabProps) { return ( {label} diff --git a/rsconcept/frontend/src/components/Common/ConceptTooltip.tsx b/rsconcept/frontend/src/components/Common/ConceptTooltip.tsx index 13d9b454..ecf3a42f 100644 --- a/rsconcept/frontend/src/components/Common/ConceptTooltip.tsx +++ b/rsconcept/frontend/src/components/Common/ConceptTooltip.tsx @@ -12,9 +12,9 @@ extends Omit { } function ConceptTooltip({ - className, layer='z-tooltip', place='bottom', + className, style, ...restProps }: ConceptTooltipProps) { diff --git a/rsconcept/frontend/src/components/Common/Dropdown.tsx b/rsconcept/frontend/src/components/Common/Dropdown.tsx index 3d310976..a3ba3ca3 100644 --- a/rsconcept/frontend/src/components/Common/Dropdown.tsx +++ b/rsconcept/frontend/src/components/Common/Dropdown.tsx @@ -1,17 +1,19 @@ import clsx from 'clsx'; +import { CProps } from '../props'; import Overlay from './Overlay'; -interface DropdownProps { +interface DropdownProps +extends CProps.Styling { stretchLeft?: boolean - dimensions?: string children: React.ReactNode } function Dropdown({ - dimensions = 'w-fit', + className, stretchLeft, - children + children, + ...restProps }: DropdownProps) { return ( {children} ); diff --git a/rsconcept/frontend/src/components/Common/DropdownButton.tsx b/rsconcept/frontend/src/components/Common/DropdownButton.tsx index c06c431c..79cea12b 100644 --- a/rsconcept/frontend/src/components/Common/DropdownButton.tsx +++ b/rsconcept/frontend/src/components/Common/DropdownButton.tsx @@ -1,27 +1,22 @@ import clsx from 'clsx'; -interface DropdownButtonProps { +import { CProps } from '../props'; + +interface DropdownButtonProps +extends CProps.Button { text?: string icon?: React.ReactNode - className?: string - tooltip?: string | undefined - onClick?: () => void - disabled?: boolean - children?: React.ReactNode } function DropdownButton({ - text, icon, children, - tooltip, className, - disabled, - onClick + text, icon, className, onClick, + children, + ...restProps }: DropdownButtonProps) { return (