# All files / src/components/atoms ButtonsSection.tsx

0% Statements 0/107
0% Branches 0/1
0% Functions 0/1
0% Lines 0/107

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108

     import { Button } from '@/components/ui/button'
    import { Card } from '@/components/ui/card'
    import { Separator } from '@/components/ui/separator'
    import {
      Heart,
      Star,
      Lightning,
      Plus,
    } from '@phosphor-icons/react'
    import { ComponentShowcase } from '@/components/demo/ComponentShowcase'
    import { atomsCodeSnippets } from '@/lib/component-code-snippets'
    import { Snippet } from '@/lib/types'

    interface ButtonsSectionProps {
      onSaveSnippet: (snippet: Omit<Snippet, 'id' | 'createdAt' | 'updatedAt'>) => void
    }

    export function ButtonsSection({ onSaveSnippet }: ButtonsSectionProps) {
      return (
        <section className="space-y-6">
          <div>
            <h2 className="text-3xl font-bold mb-2">Buttons</h2>
            <p className="text-muted-foreground">
              Interactive controls with multiple variants and states
            </p>
          </div>

          <ComponentShowcase
            code={atomsCodeSnippets.buttonWithIcons}
            title="Button with Icons"
            description="Buttons with icon and text combinations"
            category="atoms"
            onSaveSnippet={onSaveSnippet}
          >
            <Card className="p-6">
              <div className="space-y-8">
                <div className="space-y-3">
                  <h3 className="text-sm font-medium text-muted-foreground uppercase tracking-wider">
                    Variants
                  </h3>
                  <div className="flex flex-wrap gap-4">
                    <Button>Default</Button>
                    <Button variant="secondary">Secondary</Button>
                    <Button variant="destructive">Destructive</Button>
                    <Button variant="outline">Outline</Button>
                    <Button variant="ghost">Ghost</Button>
                    <Button variant="link">Link</Button>
                  </div>
                </div>

                <Separator />

                <div className="space-y-3">
                  <h3 className="text-sm font-medium text-muted-foreground uppercase tracking-wider">
                    Sizes
                  </h3>
                  <div className="flex flex-wrap items-center gap-4">
                    <Button size="sm">Small</Button>
                    <Button size="default">Default</Button>
                    <Button size="lg">Large</Button>
                    <Button size="icon">
                      <Heart weight="fill" />
                    </Button>
                  </div>
                </div>

                <Separator />

                <div className="space-y-3">
                  <h3 className="text-sm font-medium text-muted-foreground uppercase tracking-wider">
                    With Icons
                  </h3>
                  <div className="flex flex-wrap gap-4">
                    <Button>
                      <Star weight="fill" />
                      Favorite
                    </Button>
                    <Button variant="outline">
                      <Plus weight="bold" />
                      Add Item
                    </Button>
                    <Button variant="secondary">
                      <Lightning weight="fill" />
                      Quick Action
                    </Button>
                  </div>
                </div>

                <Separator />

                <div className="space-y-3">
                  <h3 className="text-sm font-medium text-muted-foreground uppercase tracking-wider">
                    States
                  </h3>
                  <div className="flex flex-wrap gap-4">
                    <Button disabled>Disabled</Button>
                    <Button variant="outline" disabled>
                      Disabled Outline
                    </Button>
                  </div>
                </div>
              </div>
            </Card>
          </ComponentShowcase>
        </section>
      )
    }