1
0
Fork 0

🔧 Switched to default export for patterns

This commit is contained in:
Joost De Cock 2019-05-02 14:33:34 +02:00
parent 1c127410b5
commit bb331a0964
70 changed files with 457 additions and 422 deletions

View file

@ -1,7 +1,7 @@
import React from "react";
import { configure } from "@storybook/react";
import "../../css-theme/dist/theme.css";
import { addParameters, addDecorator } from "@storybook/react";
import { configure } from "@storybook/react";
import { addDecorator } from "@storybook/react";
import { IntlProvider } from "react-intl";
import { strings } from "@freesewing/i18n";
@ -17,11 +17,4 @@ addDecorator(story => (
</IntlProvider>
));
//addParameters({
// backgrounds: [
// { name: 'Light', value: '#f8f9fa', default: true },
// { name: 'Dark', value: '#212529' },
// ],
//});
configure(loadStories, module);

View file

@ -27,12 +27,15 @@
"storybook": "start-storybook -p 6663"
},
"peerDependencies": {
"@freesewing/i18n": "^2.0.0-alpha.3",
"@freesewing/patterns": "^2.0.0-alpha.3",
"@freesewing/utils": "^2.0.0-alpha.3",
"prop-types": "15.7.2",
"react": "^16.4.1",
"react-intl": "^2.8.0"
"prop-types": "15.7.2",
"@freesewing/patterns": "^2.0.0-alpha.4",
"@freesewing/i18n": "^2.0.0-alpha.4",
"@freesewing/utils": "^2.0.0-alpha.4",
"react-intl": "^2.8.0",
"@material-ui/core": "^3.9.3",
"@material-ui/icons": "^3.0.2",
"@material-ui/lab": "^3.0.0-alpha.30"
},
"files": [
"dist/*",

View file

@ -1,7 +1,7 @@
import React, { useState } from "react";
import PropTypes from "prop-types";
import Slider from "@material-ui/lab/Slider";
import { withStyles } from "@material-ui/styles";
import { withStyles } from "@material-ui/core/styles";
const PaddedSlider = withStyles({
container: {

View file

@ -3,7 +3,7 @@ import PropTypes from "prop-types";
import FormFieldList from "../../.form/FormFieldList";
import OptionPreamble from "../OptionPreamble";
import { injectIntl } from "react-intl";
import { i18n as languages } from "@freesewing/i18n";
import { languages } from "@freesewing/i18n";
const DraftSettingLanguage = props => {
const [value, setValue] = useState(props.intl.locale);

View file

@ -1,6 +1,6 @@
import React from "react";
import Button from "@material-ui/core/Button";
import { i18n } from "@freesewing/i18n";
import { languages } from "@freesewing/i18n";
const LanguageChooser = props => {
const styles = {
@ -27,7 +27,7 @@ const LanguageChooser = props => {
return (
<div style={styles.container}>
<div style={styles.chooser}>
{Object.keys(i18n).map(lang => {
{Object.keys(languages).map(lang => {
return (
<Button
style={styles.button}
@ -37,7 +37,7 @@ const LanguageChooser = props => {
variant="contained"
onClick={() => changeLanguage(lang)}
>
{i18n[lang][lang]}
{languages[lang][lang]}
</Button>
);
})}