Skip to content

Commit b03e629

Browse files
committed
fix: deleted remains of radix
1 parent 024d809 commit b03e629

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/components/ui/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import { Slot } from './radix-compatibility';
2+
import { Slot } from './compatibility-layer';
33
import type { VariantProps } from 'class-variance-authority';
44

55
import { cn } from '@/lib/utils';
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ interface DialogRootProps {
3939
onOpenChange?: (open: boolean) => void;
4040
}
4141

42-
// Create a Dialog Root that has the same API as Radix's
42+
// Create a Dialog Root with similar API to ensure compatibility
4343
const Dialog: React.FC<DialogRootProps> = ({ children, open, onOpenChange }) => {
4444
// IMPORTANT: Initialize isOpen to false by default
4545
const [isOpen, setIsOpen] = useState(open === true ? true : false);
@@ -79,7 +79,7 @@ const PopoverContent: React.FC<{children: React.ReactNode, className?: string}>
7979

8080
// Using our better tooltip implementation instead of the dummy ones
8181

82-
// Export all components with Radix-compatible names
82+
// Export all components with consistent naming for compatibility
8383
export {
8484
// Dialog components
8585
Dialog,

src/components/ui/simple-tooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const SimpleTooltip: React.FC<SimpleTooltipProps> = ({
119119
);
120120
};
121121

122-
// For API compatibility with Radix
122+
// For API compatibility with component structure
123123
const SimpleTooltipTrigger: React.FC<{ children: React.ReactNode; asChild?: boolean }> = ({ children }) => {
124124
return <>{children}</>;
125125
};

src/lib/react-shim.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* This module ensures React global methods are available
3-
* It's particularly needed for Radix components that expect
4-
* React.useLayoutEffect and React.createContext to be available globally
3+
* It's needed for compatibility with Deno Deploy and ensures
4+
* methods like React.useLayoutEffect and React.createContext are available globally
55
*/
66

77
// Safely check and set properties
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Polyfills for Radix UI components that use useLayoutEffect
3-
* This helps prevent the "Cannot read properties of undefined (reading 'useLayoutEffect')" error
2+
* Polyfills for component compatibility with Deno Deploy
3+
* This helps prevent the "Cannot read properties of undefined" errors
44
* in certain environments like SSR or when window.React isn't properly set
55
*/
66

@@ -47,7 +47,7 @@ if (typeof window !== 'undefined') {
4747
}
4848

4949
// Export a dummy function to make TypeScript happy when importing this module
50-
export default function ensureRadixPolyfill() {
50+
export default function ensureReactPolyfill() {
5151
// This function does nothing, it just ensures the side effects above are executed
5252
return true;
5353
}

tailwind.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ export default {
100100
keyframes: {
101101
'accordion-down': {
102102
from: { height: 0 },
103-
to: { height: 'var(--radix-accordion-content-height)' },
103+
to: { height: 'var(--accordion-content-height, auto)' },
104104
},
105105
'accordion-up': {
106-
from: { height: 'var(--radix-accordion-content-height)' },
106+
from: { height: 'var(--accordion-content-height, auto)' },
107107
to: { height: 0 },
108108
},
109109
},

0 commit comments

Comments
 (0)