<Button>
Strato Admin provides a wrapper around Cloudscape's Button component, ensuring consistent styling across the framework.
Props
| Prop | Type | Default | Description |
|---|
Primary Button
...
Used for the main action on a page.

Normal Button
Used for secondary actions like "Cancel" or "Go Back".

Usage
You can use the Button component from strato-cloudscape.
import { Button } from '@strato-admin/cloudscape';
<Button variant="primary">Save Changes</Button>;
Storybook Examples
Here is the source code for the examples shown above:
import type { Meta, StoryObj } from '@storybook/react';
import { Button } from './Button';
const meta: Meta<typeof Button> = {
title: 'Components/Button',
component: Button,
tags: ['autodocs'],
argTypes: {
variant: {
options: ['primary', 'normal', 'link', 'icon', 'inline-icon'],
control: { type: 'select' },
},
},
};
export default meta;
type Story = StoryObj<typeof Button>;
export const Primary: Story = {
args: {
variant: 'primary',
children: 'Save Changes',
},
};
export const Normal: Story = {
args: {
variant: 'normal',
children: 'Cancel',
},
};