import { Meta, Canvas } from '@storybook/addon-docs/blocks';
import * as stories from './PocketSurface.story';

<Meta title="Internal/PocketSurface/Developer Guide" />

# PocketSurface

<div
  style={{
    backgroundColor: '#fff3cd',
    border: '1px solid #ffb800',
    borderRadius: '8px',
    padding: '16px 20px',
    marginBottom: '24px',
  }}
>
  <strong>⚠️ Use under extrict design guidelines</strong>
  <p style={{ margin: '8px 0 0' }}>
    This component is <strong>not exposed in Figma</strong> and is
    <strong>not intended for free use by product teams</strong>. It has strict design directions and
    must only be used within approved Pocket-themed surfaces.
  </p>
</div>

`PocketSurface` is a polymorphic container that scopes pocket design tokens as CSS custom properties
and applies background and text colours for the selected pocket palette variant.

## Usage

```tsx
import PocketSurface from '@transferwise/components/pocketSurface';

<PocketSurface pocket="dark-gold">
  <p>Content inherits pocket palette colours</p>
</PocketSurface>;
```

## Available Tokens

Each `PocketSurface` exposes the following CSS custom properties scoped to its variant:

```
--color-content-primary
--color-content-secondary
--color-content-link
--color-content-link-hover
--color-content-link-active

--color-interactive-primary
--color-interactive-primary-hover
--color-interactive-primary-active
--color-interactive-accent
--color-interactive-accent-hover
--color-interactive-accent-active
--color-interactive-control
--color-interactive-control-hover
--color-interactive-control-active

--color-background-screen
```

## Variants

<Canvas of={stories.Variants} />
