Styleguidist

Contactar con el profesor

Nos permite probar módulos de manera independiente.

npm i -g cross-env
npm install -g webpack
npm install -g react-styleguidist
package.json
{
	...
	"scripts": {
    	...
    	"start-styleguide": "styleguidist server",
	},
	...
}
./src/components/titanpad/README.md
Basic usage

```js
import Titanpad from './index';

<Titanpad visible={true} cod="appsguays" />    
```
./src/components/titanpad/index.js
import React, { useState, useEffect } from 'react';

export default ({ visible, cod }) => {
    return (
        <div>
			...
        </div>
    )
}

Referenciamos todos los componentes que queremos evaluar.

styleguide.config.js
const path = require('path');
const webpackConfig = require('./webpack.config.js');

module.exports = {
	webpackConfig,
	styleguideDir: 'docs',
	skipComponentsWithoutExample: true,
	theme: {
		maxWidth: 1400,
	},
	title: 'Termine Core',
	sections: [
		{
			name: 'Titanpad',
			components: 'src/components/titanpad/index.js',
		},
		{
			name: 'Paneles',
			components: 'src/components/paneles/index.js',
		},
	],
};
← Build
Typescript →

Aviso Legal | Política de privacidad