1
0
Fork 0
freesewing/packages/brian/example/src/App.js

38 lines
918 B
JavaScript
Raw Normal View History

import React from 'react'
import freesewing from '@freesewing/core'
import Workbench from '@freesewing/components/Workbench'
import 'typeface-roboto-condensed'
2020-11-04 20:45:18 +01:00
import 'typeface-raleway'
import '@freesewing/css-theme'
2019-05-28 07:44:07 +02:00
import Pattern from 'pattern'
2019-05-28 07:44:07 +02:00
2020-04-26 13:09:54 +02:00
const App = (props) => {
// You can use this to add transations
/*
2020-04-26 13:09:54 +02:00
let translations = {
JSON: 'JSON',
someOtherString: 'Some other string that needs translation'
}
*/
2020-04-26 13:09:54 +02:00
// Adds support for loading an external pattern configuration
let recreate
2020-11-18 20:30:14 +01:00
if (window) recreate = window.location.pathname.substr(1).split('/')
if (recreate.length === 3 && recreate[0] === 'from')
recreate = { from: recreate[1], id: recreate[2] }
else recreate = false
2020-03-14 15:04:45 +01:00
return (
<Workbench
freesewing={freesewing}
Pattern={Pattern}
userLanguage="en"
recreate={recreate}
//translations={translations}
2020-03-14 15:04:45 +01:00
/>
)
}
2019-05-28 07:44:07 +02:00
export default App