chore: add eslint plugins for import and className sorting

This commit is contained in:
shadcn 2023-06-11 15:39:04 +04:00
parent 0fa620719b
commit d96be6654d
36 changed files with 522 additions and 174 deletions

View file

@ -3,9 +3,9 @@
import { UseChatHelpers } from 'ai-connector'
import { RefreshCcw, StopCircle } from 'lucide-react'
import { Button } from '@/components/ui/button'
import { ExternalLink } from '@/components/external-link'
import { PromptForm } from '@/components/prompt-form'
import { Button } from '@/components/ui/button'
export interface ChatPanelProps
extends Pick<
@ -23,8 +23,8 @@ export function ChatPanel({
messages
}: ChatPanelProps) {
return (
<div className="fixed bottom-0 left-0 right-0 bg-gradient-to-b from-muted/10 from-10% to-muted/30 to-50%">
<div className="sm:max-w-2xl sm:px-4 mx-auto">
<div className="fixed inset-x-0 bottom-0 bg-gradient-to-b from-muted/10 from-10% to-muted/30 to-50%">
<div className="mx-auto sm:max-w-2xl sm:px-4">
<div className="flex items-center justify-center py-2">
{isLoading ? (
<Button
@ -32,7 +32,7 @@ export function ChatPanel({
onClick={() => stop()}
className="bg-background"
>
<StopCircle className="h-4 w-4 mr-2" />
<StopCircle className="mr-2 h-4 w-4" />
Stop generating
</Button>
) : (
@ -42,13 +42,13 @@ export function ChatPanel({
onClick={() => reload()}
className="bg-background"
>
<RefreshCcw className="h-4 w-4 mr-2" />
<RefreshCcw className="mr-2 h-4 w-4" />
Regenerate response
</Button>
)
)}
</div>
<div className="sm:p-4 border-t sm:border bg-background space-y-4 shadow-lg sm:rounded-t-xl">
<div className="space-y-4 border-t bg-background shadow-lg sm:rounded-t-xl sm:border sm:p-4">
<PromptForm
onSubmit={value => {
append({
@ -58,7 +58,7 @@ export function ChatPanel({
}}
isLoading={isLoading}
/>
<p className="hidden sm:block text-muted-foreground text-xs leading-normal text-center px-2">
<p className="hidden px-2 text-center text-xs leading-normal text-muted-foreground sm:block">
Open source AI chatbot app built with{' '}
<ExternalLink href="https://nextjs.org">Next.js</ExternalLink> and{' '}
<ExternalLink href="https://vercel.com/storage/kv">