# @pmwcs/provider

> PMWCS provider component

Latest version **1.1.0** (published 2021-06-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pmwcs/provider
pnpm add @pmwcs/provider
yarn add @pmwcs/provider
bun add @pmwcs/provider
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-06-20 |
| First published | 2020-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Maintainers | commenthol |
| Keywords | pmwcs, preact, material, web, components, provider |

## Links

- npm: https://www.npmjs.com/package/@pmwcs/provider
- Repository: https://github.com/pmwcs/pmwcs
- Homepage: https://github.com/pmwcs/pmwcs#readme
- Issues: https://github.com/pmwcs/pmwcs/issues
- npm.io page: https://npm.io/package/@pmwcs/provider

## Dependencies (1)

- [@pmwcs/base](https://npm.io/package/@pmwcs/base.md) ^1.1.0

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@mesalvo/react-ui](https://npm.io/package/@mesalvo/react-ui.md) — 1.7K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2021-06-20
- 1.0.0-2 (next) — 2020-09-05
- 1.0.2 — 2020-12-30
- 1.0.1 — 2020-10-11
- 1.0.0 — 2020-10-07
- 1.0.0-1 — 2020-08-30

## README

# Provider

A component that provides global configuration for PMWCS.

- Module **@pmwcs/provider**


You can wrap your top level App component with PMWCS provider to set global configuration options. Just pass the options in as props.

```jsx

  `
  import { h } from 'preact'
  import * as ReactDOM from 'react-dom';
  import App from './App'; // your main app component
  import { PMWCSProvider } from '@pmwcs/provider';

  // This example disables ripples globally by default
  ReactDOM.render(
    <PMWCSProvider
      // Globally disable ripples
      ripple={false}
      // Global options for icons
      // Takes the same options as the icon component
      icon={{
        basename: 'material-icons'
      }}
      // Global options for typography
      // allows mapping of a defaultTag or specific classes
      // See the Typography docs for more info
      typography={{
        defaultTag: 'div',
        headline1: 'h1'
      }}
      // Global options for tooltips
      // Takes most of the options for tooltips
      // See the Tooltip docs for more info
      tooltip={{
        align: 'right'
      }}
    >
      <App />
    </PMWCSProvider>,
    document.getElementById('root'),
  );
`

```

## PMWCSProvider
A provider for setting global options in PMWCS.

### Props

| Name | Type | Description |
|------|------|-------------|
| `children` | `React.ReactNode` | Children to render |
| `icon` | `Partial<IconOptions>` | Global options for icons |
| `ripple` | `undefined \| false \| true` | Enable / Disable interaction ripples globally |
| `tooltip` | `Partial<TooltipOptions>` | Global tooltip options |
| `typography` | `Partial<TypographyOptions>` | Global typography options |

---
_Source: https://npm.io/package/@pmwcs/provider · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
