This repository has been archived by the owner on Jun 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add storybook * Move stories to component src * update package json * update storybook config and examples * update package.json * update contributors * update addon version * update webpack config
- Loading branch information
Showing
20 changed files
with
1,445 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,15 @@ | ||
import React from 'react'; | ||
import Base from 'terra-base'; | ||
import { configure, addDecorator } from '@storybook/react'; | ||
|
||
/* eslint-disable react/jsx-filename-extension */ | ||
addDecorator(story => <Base locale="en-US">{story()}</Base>); | ||
|
||
/* eslint-disable global-require */ | ||
function loadStories() { | ||
require('../packages/terra-consumer-nav/stories/Index.jsx'); | ||
require('../packages/terra-consumer-icon/stories/Index.jsx'); | ||
require('../packages/terra-consumer-layout/stories/Index.jsx'); | ||
} | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<script> | ||
document.documentElement.setAttribute("dir", "ltr"); | ||
</script> |
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,45 @@ | ||
const path = require('path'); | ||
const I18nAggregatorPlugin = require('terra-i18n-plugin'); | ||
const i18nSupportedLocales = require('terra-i18n/lib/i18nSupportedLocales'); | ||
const CustomProperties = require('postcss-custom-properties'); | ||
const rtl = require('postcss-rtl'); | ||
|
||
const customProperties = CustomProperties({ preserve: true, warnings: false }); | ||
|
||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.scss$/, | ||
use: [ | ||
'style-loader', | ||
{ | ||
loader: 'css-loader', | ||
options: { importLoaders: 1 }, | ||
}, | ||
{ | ||
loader: 'postcss-loader', | ||
options: { | ||
ident: 'postcss', | ||
plugins: () => [ | ||
customProperties, | ||
rtl(), | ||
], | ||
}, | ||
}, | ||
'sass-loader', | ||
], | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new I18nAggregatorPlugin({ | ||
baseDirectory: path.resolve(__dirname, '../'), | ||
translationsDirectoryRouters: ['packages'], | ||
supportedLocales: i18nSupportedLocales, | ||
}), | ||
], | ||
resolve: { | ||
modules: [path.resolve(__dirname, '../aggregated-translations'), 'node_modules'], | ||
}, | ||
}; |
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
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
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
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,105 @@ | ||
// This file is autogenerated from scripts/src/generate-example | ||
/* eslint-disable */ | ||
import React from 'react'; | ||
import Table from 'terra-table'; | ||
import IconColorIncentives from '../src/icon/IconColorIncentives'; | ||
import IconColorFootsteps from '../src/icon/IconColorFootsteps'; | ||
import IconColorRunning from '../src/icon/IconColorRunning'; | ||
import IconColorAward49 from '../src/icon/IconColorAward49'; | ||
import IconUiColor1CalendarGrid61 from '../src/icon/IconUiColor1CalendarGrid61'; | ||
import IconColorWeightScale from '../src/icon/IconColorWeightScale'; | ||
import IconColorPeakFlow from '../src/icon/IconColorPeakFlow'; | ||
import IconColorHeartRate from '../src/icon/IconColorHeartRate'; | ||
import IconColorBloodGlucose from '../src/icon/IconColorBloodGlucose'; | ||
import IconColorBloodPressure from '../src/icon/IconColorBloodPressure'; | ||
import IconColorPulseOximetry from '../src/icon/IconColorPulseOximetry'; | ||
const IconAll = () => ( | ||
<div> <Table isStriped={false} > | ||
<Table.Header> | ||
<Table.HeaderCell content={'SVG'} key={'svg'} /> | ||
<Table.HeaderCell content={'Concept'} key={'concept'} /> | ||
<Table.HeaderCell content={'Code'} key={'code'} /> | ||
</Table.Header> | ||
<Table.Rows> | ||
<tr style={{ backgroundColor: '#EEEEEE' }}> | ||
<td><IconColorIncentives height='2em' width='2em' /></td> | ||
<td>color-incentives</td> | ||
<td> | ||
import IconColorIncentives from 'terra-consumer-icon/lib/icon/IconColorIncentives'; | ||
</td> | ||
</tr> | ||
<tr style={{ backgroundColor: '#EEEEEE' }}> | ||
<td><IconColorFootsteps height='2em' width='2em' /></td> | ||
<td>color-footsteps</td> | ||
<td> | ||
import IconColorFootsteps from 'terra-consumer-icon/lib/icon/IconColorFootsteps'; | ||
</td> | ||
</tr> | ||
<tr style={{ backgroundColor: '#EEEEEE' }}> | ||
<td><IconColorRunning height='2em' width='2em' /></td> | ||
<td>color-running</td> | ||
<td> | ||
import IconColorRunning from 'terra-consumer-icon/lib/icon/IconColorRunning'; | ||
</td> | ||
</tr> | ||
<tr style={{ backgroundColor: '#EEEEEE' }}> | ||
<td><IconColorAward49 height='2em' width='2em' /></td> | ||
<td>color_award-49</td> | ||
<td> | ||
import IconColorAward49 from 'terra-consumer-icon/lib/icon/IconColorAward49'; | ||
</td> | ||
</tr> | ||
<tr style={{ backgroundColor: '#EEEEEE' }}> | ||
<td><IconUiColor1CalendarGrid61 height='2em' width='2em' /></td> | ||
<td>ui-color-1_calendar-grid-61</td> | ||
<td> | ||
import IconUiColor1CalendarGrid61 from 'terra-consumer-icon/lib/icon/IconUiColor1CalendarGrid61'; | ||
</td> | ||
</tr> | ||
<tr style={{ backgroundColor: '#EEEEEE' }}> | ||
<td><IconColorWeightScale height='2em' width='2em' /></td> | ||
<td>color-weight-scale</td> | ||
<td> | ||
import IconColorWeightScale from 'terra-consumer-icon/lib/icon/IconColorWeightScale'; | ||
</td> | ||
</tr> | ||
<tr style={{ backgroundColor: '#EEEEEE' }}> | ||
<td><IconColorPeakFlow height='2em' width='2em' /></td> | ||
<td>color-peak-flow</td> | ||
<td> | ||
import IconColorPeakFlow from 'terra-consumer-icon/lib/icon/IconColorPeakFlow'; | ||
</td> | ||
</tr> | ||
<tr style={{ backgroundColor: '#EEEEEE' }}> | ||
<td><IconColorHeartRate height='2em' width='2em' /></td> | ||
<td>color-heart-rate</td> | ||
<td> | ||
import IconColorHeartRate from 'terra-consumer-icon/lib/icon/IconColorHeartRate'; | ||
</td> | ||
</tr> | ||
<tr style={{ backgroundColor: '#EEEEEE' }}> | ||
<td><IconColorBloodGlucose height='2em' width='2em' /></td> | ||
<td>color-blood-glucose</td> | ||
<td> | ||
import IconColorBloodGlucose from 'terra-consumer-icon/lib/icon/IconColorBloodGlucose'; | ||
</td> | ||
</tr> | ||
<tr style={{ backgroundColor: '#EEEEEE' }}> | ||
<td><IconColorBloodPressure height='2em' width='2em' /></td> | ||
<td>color-blood-pressure</td> | ||
<td> | ||
import IconColorBloodPressure from 'terra-consumer-icon/lib/icon/IconColorBloodPressure'; | ||
</td> | ||
</tr> | ||
<tr style={{ backgroundColor: '#EEEEEE' }}> | ||
<td><IconColorPulseOximetry height='2em' width='2em' /></td> | ||
<td>color-pulse-oximetry</td> | ||
<td> | ||
import IconColorPulseOximetry from 'terra-consumer-icon/lib/icon/IconColorPulseOximetry'; | ||
</td> | ||
</tr> | ||
</Table.Rows> | ||
</Table> | ||
</div>); | ||
|
||
export default IconAll; |
Oops, something went wrong.