diff --git a/src/components/Accordion/Accordion.tsx b/src/components/Accordion/Accordion.tsx index 490843e..b13ca84 100644 --- a/src/components/Accordion/Accordion.tsx +++ b/src/components/Accordion/Accordion.tsx @@ -20,7 +20,8 @@ export const Accordion: React.FC = ({ children, className = 'ui-p-4 sm:ui-p-4', variant, - wrapperClassName = '' + wrapperClassName = '', + ...props }) => { const [isActive, setIsActive] = useState(false); @@ -28,7 +29,7 @@ export const Accordion: React.FC = ({ const nodeRef = useRef(null); return ( - +
= ({ onClose, children, disableClose, - hideCloseIcon + hideCloseIcon, + ...props }) => { const ref = useRef(null); useOnClickOutside(ref, () => !disableClose && onClose?.()); @@ -56,6 +57,7 @@ export const Dialog: React.FC = ({ wrapperClass, 'ui-overflow-y-auto ui-relative ui-w-full ui-max-w-md ui-h-full ui-max-h-full md:ui-h-auto' )} + {...props} > {!hideCloseIcon && ( = ({ triggerElementProps, contentAlignment = 'left', contentClassName = 'ui-gradient-primary', - renderFunction + renderFunction, + ...props }) => { const ref = useRef(null); const nodeRef = useRef(null); @@ -67,6 +68,7 @@ export const Dropdown: React.FC = ({
= ({ link, text, withoutIcon, - border + border, + ...props }) => { return ( = ({ href={link} rel='noreferrer noopener' target='_blank' + {...props} > {text} {!withoutIcon && } diff --git a/src/components/Icon/Icon.tsx b/src/components/Icon/Icon.tsx index f976598..cf4b4c2 100644 --- a/src/components/Icon/Icon.tsx +++ b/src/components/Icon/Icon.tsx @@ -11,7 +11,8 @@ export const Icon: React.FC = ({ name, cursorPointer = false, className = 'text-lg', - onClick + onClick, + ...props }) => { return ( = ({ className )} onClick={onClick} + {...props} /> ); }; diff --git a/src/components/IconButton/IconButton.stories.tsx b/src/components/IconButton/IconButton.stories.tsx index d4c72c3..fc98f51 100644 --- a/src/components/IconButton/IconButton.stories.tsx +++ b/src/components/IconButton/IconButton.stories.tsx @@ -10,7 +10,7 @@ export default { } as ComponentMeta; const Template: ComponentStory = (args) => ( - + ); diff --git a/src/components/Tab/Tab.tsx b/src/components/Tab/Tab.tsx index db00d42..726b7aa 100644 --- a/src/components/Tab/Tab.tsx +++ b/src/components/Tab/Tab.tsx @@ -7,9 +7,10 @@ export type TabProps = { disabled?: boolean; onClick: () => void; className?: string; + testId?: string; }; -export const Tab: React.FC = ({ text, active, onClick, disabled, className }) => ( +export const Tab: React.FC = ({ text, active, onClick, disabled, className, testId }) => (