https://github.com/idimetrix/storybook-addon-meta
https://github.com/idimetrix/storybook-addon-meta
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/idimetrix/storybook-addon-meta
- Owner: idimetrix
- License: mit
- Created: 2021-04-21T23:35:09.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-22T01:15:24.000Z (about 4 years ago)
- Last Synced: 2024-12-05T04:15:55.510Z (6 months ago)
- Language: TypeScript
- Size: 2.51 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
- [storybook-addon-meta](#storybook-addon-meta)
- [Installation](#installation)
- [Demo](#demo)
- [Documentation](#documentation)
- [Screenshot](#screenshot)
- [Classes](#classes)
- [Class: Meta](#class-meta)
- [Properties](#properties)
- [Usage](#usage)
- [Demo](#demo-1)
- [Table of contents](#table-of-contents)
- [Constructors](#constructors)
- [Methods](#methods)
- [storybook-addon-meta](#storybook-addon-meta-1)
- [Table of contents](#table-of-contents-1)
- [Modules](#modules)
- [Modules](#modules-1)
- [Module: index](#module-index)
- [Table of contents](#table-of-contents-2)
- [References](#references)
- [Module: lib/Meta](#module-libmeta)
- [Table of contents](#table-of-contents-3)
- [Module: log](#module-log)
- [Table of contents](#table-of-contents-4)
- [Variables](#variables)
- [Module: types/declaration](#module-typesdeclaration)storybook-addon-meta / [Exports](#modulesmd)
## storybook-addon-meta
#### Meta information for Storybook components
## Installation
Install with [npm](https://www.npmjs.com):
```sh
$ npm install --save storybook-addon-meta
```Install with [yarn](https://yarnpkg.com):
```sh
$ yarn add storybook-addon-meta
```## [Demo](https://storybook-addon-meta.netlify.app/)
#### [Try online demo](https://storybook-addon-meta.netlify.app/)
## [Documentation](https://www.npmjs.com/package/storybook-addon-meta)
#### [Try online documentation](https://www.npmjs.com/package/storybook-addon-meta)
## Screenshot

# Classes
[storybook-addon-meta](#readmemd) / [Exports](#modulesmd) / [lib/Meta](#moduleslib_metamd) / Meta
## Class: Meta
[lib/Meta](#moduleslib_metamd).Meta
### Properties
```js
static componentPath(component: any): string;
static componentName(component: any): string;
```### Usage
#### es module
```js
import { Meta } from 'storybook-addon-meta'const path = Meta.componentPath(component); // return component path
const name = Meta.componentName(component); // return component name
```#### commonjs
```js
var Meta = require('storybook-addon-meta').Meta;var path = Meta.componentPath(component); // return component path
var name = Meta.componentName(component); // return component name
```### [Demo](https://storybook-addon-meta.netlify.app/)
#### [Try online demo](https://storybook-addon-meta.netlify.app/)
#### es module
```js
const path = Meta.componentPath(component); // return component path
const name = Meta.componentName(component); // return component name
```#### commonjs
```js
var path = Meta.componentPath(component); // return component path
var name = Meta.componentName(component); // return component name
```### Table of contents
#### Constructors
- [constructor](#constructor)
#### Methods
- [componentName](#componentname)
- [componentPath](#componentpath)### Constructors
#### constructor
\+ **new Meta**(): [*Meta*](#classeslib_metametamd)
**Returns:** [*Meta*](#classeslib_metametamd)
### Methods
#### componentName
▸ `Static`**componentName**(`component`: *any*): *string*
##### Parameters:
| Name | Type |
| :------ | :------ |
| `component` | *any* |**Returns:** *string*
Defined in: [lib/Meta.ts:31](https://github.com/idimetrix/storybook-addon-meta/blob/d30f325/src/lib/Meta.ts#L31)
___
#### componentPath
▸ `Static`**componentPath**(`component`: *any*): *string*
##### Parameters:
| Name | Type |
| :------ | :------ |
| `component` | *any* |**Returns:** *string*
Defined in: [lib/Meta.ts:17](https://github.com/idimetrix/storybook-addon-meta/blob/d30f325/src/lib/Meta.ts#L17)
[storybook-addon-meta](#readmemd) / Exports
# storybook-addon-meta
## Table of contents
### Modules
- [index](#modulesindexmd)
- [lib/Meta](#moduleslib_metamd)
- [log](#moduleslogmd)
- [types/declaration](#modulestypes_declarationmd)# Modules
[storybook-addon-meta](#readmemd) / [Exports](#modulesmd) / index
## Module: index
### Table of contents
#### References
- [Meta](#meta)
### References
#### Meta
Re-exports: [Meta](#classeslib_metametamd)
[storybook-addon-meta](#readmemd) / [Exports](#modulesmd) / lib/Meta
## Module: lib/Meta
### Table of contents
#### Classes
- [Meta](#classeslib_metametamd)
[storybook-addon-meta](#readmemd) / [Exports](#modulesmd) / log
## Module: log
### Table of contents
#### Variables
- [log](#log)
### Variables
#### log
• `Const` **log**: Logger
Defined in: [log.ts:3](https://github.com/idimetrix/storybook-addon-meta/blob/d30f325/src/log.ts#L3)
[storybook-addon-meta](#readmemd) / [Exports](#modulesmd) / types/declaration
## Module: types/declaration