forked from necolas/react-native-web
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Material UI #1
Open
mnajdova
wants to merge
11
commits into
master
Choose a base branch
from
material-ui-updated
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Material UI #1
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
90a54a8
Add mui styles
oliviertassinari 6211ef5
wip
mnajdova e14d743
Merge branch 'master' into material-ui-updated & hot fixed for window…
mnajdova 98bfa0c
removed precommit
mnajdova f3983c9
Update packages/benchmarks/src/impl.js
mnajdova 4a01d71
reverted some changes
mnajdova a31cf5c
Merge branch 'material-ui-updated' of https://github.com/mnajdova/rea…
mnajdova 7260472
Merge branch 'master' into material-ui-updated
mnajdova 5adda94
wip
mnajdova 21675ba
box
mnajdova 2431c2e
dynamic props
mnajdova 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
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,5 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
yarn-path ".yarn/releases/yarn-1.16.0.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
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
File renamed without changes.
28 changes: 12 additions & 16 deletions
28
...hmarks/src/implementations/emotion/Dot.js → ...marks/src/implementations/@emotion/Dot.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 |
---|---|---|
@@ -1,32 +1,28 @@ | ||
import React from 'react'; | ||
import { css } from 'emotion'; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/core'; | ||
|
||
const Dot = ({ size, x, y, children, color }) => ( | ||
<div | ||
className={css(styles.root, { | ||
css={{ | ||
position: 'absolute', | ||
cursor: 'pointer', | ||
width: 0, | ||
height: 0, | ||
borderColor: 'transparent', | ||
borderStyle: 'solid', | ||
borderTopWidth: 0, | ||
transform: 'translate(50%, 50%)', | ||
borderBottomColor: color, | ||
borderRightWidth: `${size / 2}px`, | ||
borderBottomWidth: `${size / 2}px`, | ||
borderLeftWidth: `${size / 2}px`, | ||
marginLeft: `${x}px`, | ||
marginTop: `${y}px` | ||
})} | ||
}} | ||
> | ||
{children} | ||
</div> | ||
); | ||
|
||
const styles = { | ||
root: { | ||
position: 'absolute', | ||
cursor: 'pointer', | ||
width: 0, | ||
height: 0, | ||
borderColor: 'transparent', | ||
borderStyle: 'solid', | ||
borderTopWidth: 0, | ||
transform: 'translate(50%, 50%)' | ||
} | ||
}; | ||
|
||
export default Dot; |
File renamed without changes.
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,28 @@ | ||
import React from 'react'; | ||
/** @jsx jsx */ | ||
import { jsx } from '@emotion/core'; | ||
|
||
class View extends React.Component { | ||
render() { | ||
const { style, ...other } = this.props; | ||
return <div {...other} css={{ | ||
alignItems: 'stretch', | ||
borderWidth: 0, | ||
borderStyle: 'solid', | ||
boxSizing: 'border-box', | ||
display: 'flex', | ||
flexBasis: 'auto', | ||
flexDirection: 'column', | ||
flexShrink: 0, | ||
margin: 0, | ||
padding: 0, | ||
position: 'relative', | ||
// fix flexbox bugs | ||
minHeight: 0, | ||
minWidth: 0, | ||
...style | ||
}} />; | ||
} | ||
} | ||
|
||
export default View; |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
packages/benchmarks/src/implementations/material-ui/Box.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,54 @@ | ||
/* eslint-disable react/prop-types */ | ||
import React from 'react'; | ||
import classnames from 'classnames'; | ||
import View from './View'; | ||
import { makeStyles } from '@material-ui/styles'; | ||
|
||
const useStyles = makeStyles({ | ||
outer: { | ||
alignSelf: 'flex-start', | ||
padding: 4 | ||
}, | ||
row: { | ||
flexDirection: 'row' | ||
}, | ||
color0: { | ||
backgroundColor: '#14171A' | ||
}, | ||
color1: { | ||
backgroundColor: '#AAB8C2' | ||
}, | ||
color2: { | ||
backgroundColor: '#E6ECF0' | ||
}, | ||
color3: { | ||
backgroundColor: '#FFAD1F' | ||
}, | ||
color4: { | ||
backgroundColor: '#F45D22' | ||
}, | ||
color5: { | ||
backgroundColor: '#E0245E' | ||
}, | ||
fixed: { | ||
width: 6, | ||
height: 6 | ||
} | ||
}); | ||
|
||
function Box({ color, fixed = false, layout = 'column', outer = false, ...other }) { | ||
const classes = useStyles(); | ||
|
||
return ( | ||
<View | ||
{...other} | ||
className={classnames(classes[`color${color}`], { | ||
[classes.fixed]: fixed, | ||
[classes.outer]: outer, | ||
[classes.row]: layout === 'row' | ||
})} | ||
/> | ||
); | ||
} | ||
|
||
export default Box; |
31 changes: 31 additions & 0 deletions
31
packages/benchmarks/src/implementations/material-ui/Dot.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,31 @@ | ||
/* eslint-disable react/prop-types */ | ||
import React from 'react'; | ||
import { makeStyles } from '@material-ui/styles'; | ||
|
||
const useStyles = makeStyles({ | ||
root: { | ||
position: 'absolute', | ||
cursor: 'pointer', | ||
width: 0, | ||
height: 0, | ||
borderColor: 'transparent', | ||
borderStyle: 'solid', | ||
borderTopWidth: 0, | ||
transform: 'translate(50%, 50%)' | ||
}, | ||
dynamic: ({ size, x, y, children, color }) => ({ | ||
borderBottomColor: color, | ||
borderRightWidth: `${size / 2}px`, | ||
borderBottomWidth: `${size / 2}px`, | ||
borderLeftWidth: `${size / 2}px`, | ||
marginLeft: `${x}px`, | ||
marginTop: `${y}px` | ||
}) | ||
}); | ||
|
||
function Dot(props) { | ||
const classes = useStyles(props); | ||
return <div className={`${classes.root} ${classes.dynamic}`}>{props.children}</div>; | ||
} | ||
|
||
export default Dot; |
2 changes: 2 additions & 0 deletions
2
packages/benchmarks/src/implementations/material-ui/Provider.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,2 @@ | ||
import View from './View'; | ||
export default View; |
29 changes: 29 additions & 0 deletions
29
packages/benchmarks/src/implementations/material-ui/View.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,29 @@ | ||
/* eslint-disable react/prop-types */ | ||
import React from 'react'; | ||
import { makeStyles } from '@material-ui/styles'; | ||
|
||
const useStyles = makeStyles({ | ||
root: { | ||
alignItems: 'stretch', | ||
borderWidth: 0, | ||
borderStyle: 'solid', | ||
boxSizing: 'border-box', | ||
display: 'flex', | ||
flexBasis: 'auto', | ||
flexDirection: 'column', | ||
flexShrink: 0, | ||
margin: 0, | ||
padding: 0, | ||
position: 'relative', | ||
// fix flexbox bugs | ||
minHeight: 0, | ||
minWidth: 0 | ||
} | ||
}); | ||
|
||
function View(props) { | ||
const classes = useStyles(); | ||
return <div {...props} className={`${classes.root} ${props.className}`} />; | ||
} | ||
|
||
export default View; |
11 changes: 11 additions & 0 deletions
11
packages/benchmarks/src/implementations/material-ui/index.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,11 @@ | ||
import Box from './Box'; | ||
import Dot from './Dot'; | ||
import Provider from './Provider'; | ||
import View from './View'; | ||
|
||
export default { | ||
Box, | ||
Dot, | ||
Provider, | ||
View | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local fix to make it work on window :\