setup React Storybook; add example story for LoadingIndicator component
This commit is contained in:
		
							
								
								
									
										14
									
								
								storybook/config.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								storybook/config.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
import { configure } from '@kadira/storybook';
 | 
			
		||||
import React from 'react';
 | 
			
		||||
import { storiesOf, action } from '@kadira/storybook';
 | 
			
		||||
 | 
			
		||||
window.storiesOf = storiesOf;
 | 
			
		||||
window.action = action;
 | 
			
		||||
window.React = React;
 | 
			
		||||
 | 
			
		||||
function loadStories () {
 | 
			
		||||
  require('./stories/loading_indicator.story.jsx');
 | 
			
		||||
  // You can require as many stories as you need.
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
configure(loadStories, module);
 | 
			
		||||
							
								
								
									
										6
									
								
								storybook/stories/loading_indicator.story.jsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								storybook/stories/loading_indicator.story.jsx
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
import LoadingIndicator from '../../app/assets/javascripts/components/components/loading_indicator.jsx'
 | 
			
		||||
 | 
			
		||||
storiesOf('LoadingIndicator', module)
 | 
			
		||||
  .add('default state', () => (
 | 
			
		||||
    <LoadingIndicator />
 | 
			
		||||
  ));
 | 
			
		||||
		Reference in New Issue
	
	Block a user