Skip to content

Fix/size #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 15, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix loading of styles
  • Loading branch information
ShMcK committed Jul 15, 2019
commit 360abec6d460635cba7e74b8240243d7d717ed57
2 changes: 1 addition & 1 deletion web-app/.storybook/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// import '@alifd/next/dist/next.css'
import '@alifd/next/dist/next.css'
import { configure } from '@storybook/react'
import '../src/styles/index.css'

Expand Down
8 changes: 6 additions & 2 deletions web-app/src/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ interface Props {

const styles = {
page: {
width: window.innerWidth,
height: window.innerHeight,
margin: 0,
width: window.innerWidth - 20, // 220
height: window.innerHeight - 20, // 655
backgroundColor: 'white',
},
}

console.log('page styles')
console.log(JSON.stringify(styles.page))

const Routes = ({ state }: Props) => {
// TODO: refactor cond to user <Router><Route> and accept first route as if/else if
return (
Expand Down
3 changes: 3 additions & 0 deletions web-app/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import ReactDOM from 'react-dom'
import App from './App'

// base styles
// TODO: must be a better way to load @alifd styles
// currently these are loaded in src/editor/ReactWebView.ts as well
import '@alifd/next/dist/next.css'
import './styles/index.css'

ReactDOM.render(<App />, document.getElementById('root') as HTMLElement)