import { Meta, Story, ArgsTable, Canvas } from '@storybook/addon-docs/blocks';
import ReplaceEdition from '../ReplaceEdition';

export const mockSelectEdition = () => {}
export const mockViewCart = () => {}
export const mockExit = () => {}

<Meta title="Atoms/Replace Edition" component={ReplaceEdition} />

# ReplaceEdition
<br />

## `ReplaceEdition` is used when an edition of a non-stackable product is already in cart.
<br />

### Default
<Canvas>
    <Story name="Default">
        <ReplaceEdition editionName="Enterprise Plan" onSelectEdition={mockSelectEdition} onViewCart={mockViewCart} onExit={mockExit} />
    </Story>
</Canvas>

```jsx
import ReplaceEdition from '@appdirect/sfb-theme-components/src/atoms/replace-edition/ReplaceEdition';

<ReplaceEdition
    editionName="Enterprise Plan"
    onSelectEdition={mockSelectEdition}
    onViewCart={onViewCart}
    onExit={mockExit}
/>
```

## Props
<ArgsTable of={ReplaceEdition} />
