import { Meta, ArgTypes } from '@storybook/blocks';
import ContentShareControl from '../ContentShareControl';

<Meta title="SDK Components/MeetingControls/ContentShareControl" />

# ContentShareControl

The `ContentShareControl` component renders a `ControlBarButton` with pop over menu options to pause/play content share once enabled.

When you click the button, the content share toggles between on/off state.

You can use it in the [ControlBar component](/docs/ui-components-controlbar--page) to build the meeting controls bar.

## Importing

```javascript
import { ContentShareControl } from 'amazon-chime-sdk-component-library-react';
```

## Usage

```jsx
import React from 'react';
import {
  MeetingProvider,
  ContentShareControl
} from 'amazon-chime-sdk-component-library-react';

const App = () => {
  return (
    <MeetingProvider>
      <ContentShareControl />
    </MeetingProvider>
  );
};
```

## Props

<ArgTypes of={ContentShareControl} />

### Dependencies

- `ContentShareProvider`
- If using `MeetingProvider`, the `ContentShareProvider` is rendered by default
- `useContentShareState`
- `useContentShareControls`
