@myelmut/design-system 0.1.50 → 0.1.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myelmut/design-system",
3
- "version": "0.1.50",
3
+ "version": "0.1.51",
4
4
  "description": "Design system for Elmut project",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,7 +27,8 @@ export interface TabsProps {
27
27
  export const Tabs = ({ tabs, defaultActiveTab, onTabChange, className = '', tabClassName = '', activeTabClassName = '', contentClassName = '', variant = 'default' }: TabsProps) => {
28
28
  const [activeTab, setActiveTab] = useState(defaultActiveTab || tabs[0]?.id);
29
29
 
30
- const handleTabClick = (tabId: string) => {
30
+ const handleTabClick = (e: React.MouseEvent<HTMLButtonElement>, tabId: string) => {
31
+ e.preventDefault();
31
32
  if (tabs.find((tab) => tab.id === tabId)?.disabled) return;
32
33
 
33
34
  setActiveTab(tabId);
@@ -61,7 +62,7 @@ export const Tabs = ({ tabs, defaultActiveTab, onTabChange, className = '', tabC
61
62
  return (
62
63
  <button
63
64
  key={tab.id}
64
- onClick={() => handleTabClick(tab.id)}
65
+ onClick={(e) => handleTabClick(e, tab.id)}
65
66
  disabled={isDisabled}
66
67
  className={clsx(
67
68
  "w-full",