Skip to content

Latest commit

 

History

History

telestion-client-prop-types

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Telestion Client PropTypes

npm: @wuespace/telestion-client-prop-types

Maintainability Test Coverage GitHub Workflow Status (with branch) GitHub Node current PNPM current Twitter Follow

Helpful PropTypes for types exported by the @wuespace/telestion-client-types package.

This package is included in PSCs bootstrapped using the Telestion Client CLI by default.

Installation

First, add it as dependency to your project:

pnpm add @wuespace/telestion-client-prop-types
# or
npm install @wuespace/@wuespace/telestion-client-prop-types

Please also check that you have installed a supported version of react to use this package.

After the installation, check out the provided PropTypes:

import { dashboardPropType } from '@wuespace/telestion-client-prop-types';
import { Dashboard } from '@wuespace/telestion-client-types';

interface Props {
	dashboard: Dashboard;
}

function MyComponent({ dashboard }: Props) {
	return <p>Dashboard: {dashboard.title}</p>;
}

MyComponent.propTypes = {
	dashboard: dashboardPropType.isRequired
};

Every exported type from @wuespace/telestion-client-types has an appropriate PropType member exported in this package.

For all full list of types used in Telestion Client, check out the reference: https://wuespace.github.io/telestion-client/@wuespace/telestion-client-types/

For the equivalent PropTypes, check out the reference here: https://wuespace.github.io/telestion-client/@wuespace/telestion-client-prop-types/

Package structure

.
├── build (built in build script)
├── src
│   ├── index.ts
│   └── [...]
├── tests (utilities for testing the prop types contained in this package)
│   ├── lib (helper functions, etc., for testing the package)
│   │   ├── index.ts
│   │   └── [...]
│   └── samples (a few samples for basic data types, used for testing)
│       └── basic.ts
├── types (built in build script, gets assembled to single build/index.d.ts file)
│   ├── index.d.ts
│   └── [...]
├── CHANGELOG.md (DO NOT TOUCH! auto-generated changelog for the package)
├── LICENSE
├── package.json
├── README.md (you're here :P)
└── [...] (configuration files, etc.)

Contributing

If you want to contribute to this package, please take a look at the Telestion Client monorepo that manages this package, among other Telestion Client packages.

Contributors

Thank you to all contributors of this repository:

Contributors

Made with contributors-img.

About

This is part of Telestion, a project by WüSpace e.V..