forked from Katello/katello
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #21931 - Add react-storybook to Katello
Adds dependency for react-storybook as well as the deployer. I've included one story as an example. http://projects.theforeman.org/issues/21931
- Loading branch information
1 parent
472c322
commit 13b438b
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { configure } from '@storybook/react'; | ||
|
||
global.__ = str => str; | ||
|
||
function loadStories() { | ||
require('../webpack/stories'); | ||
} | ||
|
||
configure(loadStories, module); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
webpack/scenes/RedHatRepositories/components/EnabledRepository.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import EnabledRepository from './EnabledRepository.js'; | ||
|
||
storiesOf('RedHat Repositories Page', module).add('Enabled Repository', () => ( | ||
<EnabledRepository | ||
id={638} | ||
name="Red Hat Enterprise Linux 6 Server Kickstart x86_64 6.8" | ||
releasever="6.8" | ||
arch="x86_64" | ||
type="rpm" | ||
/> | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { configure } from '@storybook/react'; | ||
|
||
require('patternfly/dist/css/patternfly.min.css'); | ||
require('patternfly/dist/css/patternfly-additions.min.css'); | ||
|
||
const req = require.context('../', true, /.stories.js$/); | ||
|
||
function loadStories() { | ||
req.keys().forEach(filename => req(filename)); | ||
} | ||
|
||
configure(loadStories, module); |