Skip to content

An open source design system that's fully customizable and agent ready

TypeScript
1.2 KB
Raw Blame
// Copyright (c) Meta Platforms, Inc. and affiliates.

'use client';

import {Button} from '@astryxdesign/core/Button';
import {Stack} from '@astryxdesign/core/Layout';
import {Text} from '@astryxdesign/core/Text';

const SIZES = [
  {size: 'sm' as const, label: 'Small'},
  {size: 'md' as const, label: 'Medium'},
  {size: 'lg' as const, label: 'Large'},
];

export default function ButtonSizeVariants() {
  return (
    <Stack direction="vertical" gap={4}>
      <Stack direction="vertical" gap={1}>
        <Text type="supporting" color="secondary">
          Primary
        </Text>
        <Stack direction="horizontal" gap={3} vAlign="center">
          {SIZES.map(({size, label}) => (
            <Button key={size} label={label} variant="primary" size={size} />
          ))}
        </Stack>
      </Stack>
      <Stack direction="vertical" gap={1}>
        <Text type="supporting" color="secondary">
          Secondary
        </Text>
        <Stack direction="horizontal" gap={3} vAlign="center">
          {SIZES.map(({size, label}) => (
            <Button key={size} label={label} variant="secondary" size={size} />
          ))}
        </Stack>
      </Stack>
    </Stack>
  );
}