-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add storybook components for datetime picker and swipeable deck #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
🤖 Reviewers have been automatically assigned based on the CODEOWNERS file. If you need different reviewers, please update manually. |
✅ PR Size Check PassedThis PR changes 2633 lines across 6 files. |
📄 Description Added new UI components (.tsx) for: datetime-picker deck dialog-stack Created corresponding Storybook files (.stories.tsx) for each component to enable visual documentation and testing. 🛠 Changes UI components: Added under packages/design-system/ui. Storybook files: Added under devapps/storybook/stories. |
import * as React from 'react'; | ||
import { cva, type VariantProps } from 'class-variance-authority'; | ||
import { cn } from '@repo/design-system/lib/utils'; | ||
import { ChevronLeft, ChevronRight, RotateCcw, X, Heart } from 'lucide-react'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
To resolve the "Unused import ChevronRight" issue:
- Remove
ChevronRight
from the named imports on line 10:import { ChevronLeft, ChevronRight, RotateCcw, X, Heart } from 'lucide-react';
. - No other changes are necessary, as removing unused imports does not affect code functionality.
- This change should be made in the file
packages/design-system/ui/deck.tsx
, on the import statement at line 10.
-
Copy modified line R10
@@ -7,7 +7,7 @@ | ||
import * as React from 'react'; | ||
import { cva, type VariantProps } from 'class-variance-authority'; | ||
import { cn } from '@repo/design-system/lib/utils'; | ||
import { ChevronLeft, ChevronRight, RotateCcw, X, Heart } from 'lucide-react'; | ||
import { ChevronLeft, RotateCcw, X, Heart } from 'lucide-react'; | ||
|
||
// Deck variants | ||
const deckVariants = cva( |
throw new Error("DialogStackOverlay must be used within a DialogStack"); | ||
} | ||
|
||
const { closeDialog, maximizeDialog, bringToFront } = context; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
To fix the problem, we should remove the unused variable maximizeDialog
from the destructuring assignment within the DialogStackOverlay
component (line 226). Only closeDialog
and bringToFront
should be destructured from context
, as those are the only ones referenced within the function body. The fix only involves removing maximizeDialog
from the curly braces to eliminate the unused variable warning and possible confusion.
-
Copy modified line R226
@@ -223,7 +223,7 @@ | ||
throw new Error("DialogStackOverlay must be used within a DialogStack"); | ||
} | ||
|
||
const { closeDialog, maximizeDialog, bringToFront } = context; | ||
const { closeDialog, bringToFront } = context; | ||
|
||
const handleBackdropClick = (e: React.MouseEvent) => { | ||
if (e.target === e.currentTarget && dialog.closable !== false) { |
Pull Request
Description
Please provide a brief description of the changes introduced in this pull request.
Type of Change
Related Issues
Closes #<issue_number>
Branch Naming
feat/
,fix/
,docs/
,hotfix/
, etc.)Checklist
pnpm lint
andpnpm test
Screenshots (if applicable)
Additional Notes