refactor(shared): move shared ui components to share/view/ui without subfolders

This commit is contained in:
Haileyesus
2026-03-02 16:52:09 +03:00
parent f4686c0ed6
commit 5ed4798f58
13 changed files with 12 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
import * as React from 'react';
import { cva, type VariantProps } from 'class-variance-authority';
import { cn } from '../../../../lib/utils';
import { cn } from '../../../lib/utils';
const badgeVariants = cva(
'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',

View File

@@ -1,6 +1,6 @@
import * as React from 'react';
import { cva, type VariantProps } from 'class-variance-authority';
import { cn } from '../../../../lib/utils';
import { cn } from '../../../lib/utils';
// Keep visual variants centralized so all button usages stay consistent.
const buttonVariants = cva(

View File

@@ -1,5 +1,5 @@
import { Moon, Sun } from 'lucide-react';
import { useTheme } from '../../../../contexts/ThemeContext';
import { useTheme } from '../../../contexts/ThemeContext';
type DarkModeToggleProps = {
checked?: boolean;

View File

@@ -1,5 +1,5 @@
import * as React from 'react';
import { cn } from '../../../../lib/utils';
import { cn } from '../../../lib/utils';
type InputProps = React.InputHTMLAttributes<HTMLInputElement>;

View File

@@ -1,5 +1,5 @@
import * as React from 'react';
import { cn } from '../../../../lib/utils';
import { cn } from '../../../lib/utils';
type ScrollAreaProps = React.HTMLAttributes<HTMLDivElement>;

View File

@@ -1,5 +1,5 @@
import { type ReactNode, useEffect, useRef, useState } from 'react';
import { cn } from '../../../../lib/utils';
import { cn } from '../../../lib/utils';
type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';

View File

@@ -1 +0,0 @@
export { Badge, badgeVariants } from './Badge';

View File

@@ -1 +0,0 @@
export { Button, buttonVariants } from './Button';

View File

@@ -1,2 +0,0 @@
export { default } from './DarkModeToggle';
export { default as DarkModeToggle } from './DarkModeToggle';

View File

@@ -1,6 +1,6 @@
export { Badge, badgeVariants } from './badge';
export { Button, buttonVariants } from './button';
export { DarkModeToggle } from './dark-mode-toggle';
export { Input } from './input';
export { ScrollArea } from './scroll-area';
export { Tooltip } from './tooltip';
export { Badge, badgeVariants } from './Badge';
export { Button, buttonVariants } from './Button';
export { default as DarkModeToggle } from './DarkModeToggle';
export { Input } from './Input';
export { ScrollArea } from './ScrollArea';
export { default as Tooltip } from './Tooltip';

View File

@@ -1 +0,0 @@
export { Input } from './Input';

View File

@@ -1 +0,0 @@
export { ScrollArea } from './ScrollArea';

View File

@@ -1,2 +0,0 @@
export { default } from './Tooltip';
export { default as Tooltip } from './Tooltip';