-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
127 changed files
with
3,795 additions
and
5,933 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
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,34 @@ | ||
type CompiledStyle = { | ||
$$css: boolean, | ||
[key: string]: string, | ||
}; | ||
|
||
type InlineStyle = { | ||
[key: string]: mixed, | ||
}; | ||
|
||
type EitherStyle = CompiledStyle | InlineStyle; | ||
|
||
type StylesArray<+T> = T | $ReadOnlyArray<StylesArray<T>>; | ||
type Styles = StylesArray<CompiledStyle | InlineStyle | false>; | ||
type Style<+T = EitherStyle> = StylesArray<false | ?T>; | ||
|
||
type StyleqOptions = { | ||
disableCache?: boolean, | ||
disableMix?: boolean, | ||
transform?: (CompiledStyle) => CompiledStyle, | ||
}; | ||
|
||
type StyleqResult = [string, InlineStyle | null]; | ||
type Styleq = (styles: Styles) => StyleqResult; | ||
|
||
type IStyleq = { | ||
(...styles: $ReadOnlyArray<Styles>): StyleqResult, | ||
factory: (options?: StyleqOptions) => Styleq, | ||
}; | ||
|
||
declare module "styleq" { | ||
declare module.exports: { | ||
styleq: IStyleq | ||
}; | ||
} |
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 was deleted.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
packages/benchmarks/src/implementations/css-modules/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,20 @@ | ||
import React from 'react'; | ||
import styles from './dot-styles.css'; | ||
|
||
const Dot = ({ size, x, y, children, color }) => ( | ||
<div | ||
className={styles.root} | ||
style={{ | ||
borderBottomColor: color, | ||
borderRightWidth: `${size / 2}px`, | ||
borderBottomWidth: `${size / 2}px`, | ||
borderLeftWidth: `${size / 2}px`, | ||
marginLeft: `${x}px`, | ||
marginTop: `${y}px` | ||
}} | ||
> | ||
{children} | ||
</div> | ||
); | ||
|
||
export default Dot; |
10 changes: 10 additions & 0 deletions
10
packages/benchmarks/src/implementations/css-modules/dot-styles.css
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,10 @@ | ||
.root { | ||
position: absolute; | ||
cursor: pointer; | ||
width: 0; | ||
height: 0; | ||
border-color: transparent; | ||
border-style: solid; | ||
border-top-width: 0; | ||
transform: translate(50%, 50%); | ||
} |
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,9 +1,11 @@ | ||
import Box from './Box'; | ||
import Dot from './Dot'; | ||
import Provider from './Provider'; | ||
import View from './View'; | ||
|
||
export default { | ||
Box, | ||
Dot, | ||
Provider, | ||
View | ||
}; |
7 changes: 5 additions & 2 deletions
7
packages/benchmarks/src/implementations/css-modules/view-styles.css
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,15 +1,18 @@ | ||
.initial { | ||
align-items: stretch; | ||
background-color: transparent; | ||
border-width: 0; | ||
border-style: solid; | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-basis: auto; | ||
flex-direction: column; | ||
flex-shrink: 0; | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
position: relative; | ||
min-height: 0; | ||
min-width: 0; | ||
padding: 0; | ||
position: relative; | ||
z-index: 0; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
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
Oops, something went wrong.