-
-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to new API withConfig, fixes #16
- Loading branch information
1 parent
eee3523
commit acc34ab
Showing
8 changed files
with
36 additions
and
93 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,21 @@ | ||
const Test = styled({ | ||
target: 'div', | ||
const Test = styled.div.withConfig({ | ||
displayName: 'Test' | ||
})`width: 100%;`; | ||
const Test2 = styled({ | ||
target: 'div', | ||
const Test2 = styled('div').withConfig({ | ||
displayName: 'Test2' | ||
})``; | ||
const Test3 = true ? styled({ | ||
target: 'div', | ||
const Test3 = true ? styled.div.withConfig({ | ||
displayName: 'Test3' | ||
})`` : styled({ | ||
target: 'div', | ||
})`` : styled.div.withConfig({ | ||
displayName: 'Test3' | ||
})``; | ||
const styles = { One: styled({ | ||
target: 'div', | ||
const styles = { One: styled.div.withConfig({ | ||
displayName: 'One' | ||
})`` }; | ||
let Component; | ||
Component = styled({ | ||
target: 'div', | ||
Component = styled.div.withConfig({ | ||
displayName: 'Component' | ||
})``; | ||
const WrappedComponent = styled({ | ||
target: Inner, | ||
const WrappedComponent = styled(Inner).withConfig({ | ||
displayName: 'WrappedComponent' | ||
})``; |
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,24 +1,18 @@ | ||
const Test = styled({ | ||
target: "div", | ||
const Test = styled.div.withConfig({ | ||
identifier: "Test-137hlza" | ||
})`width: 100%;`; | ||
const Test2 = true ? styled({ | ||
target: "div", | ||
const Test2 = true ? styled.div.withConfig({ | ||
identifier: "Test2-bjbly" | ||
})`` : styled({ | ||
target: "div", | ||
})`` : styled.div.withConfig({ | ||
identifier: "Test2-3rtkrg" | ||
})``; | ||
const styles = { One: styled({ | ||
target: "div", | ||
const styles = { One: styled.div.withConfig({ | ||
identifier: "One-1sf086v" | ||
})`` }; | ||
let Component; | ||
Component = styled({ | ||
target: "div", | ||
Component = styled.div.withConfig({ | ||
identifier: "Component-1uo0y5n" | ||
})``; | ||
const WrappedComponent = styled({ | ||
target: Inner, | ||
const WrappedComponent = styled(Inner).withConfig({ | ||
identifier: "WrappedComponent-1hk71jk" | ||
})``; |
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,30 +1,24 @@ | ||
const Test = styled({ | ||
target: "div", | ||
const Test = styled.div.withConfig({ | ||
displayName: "Test", | ||
identifier: "Test-18z24ew" | ||
})`width: 100%;`; | ||
const Test2 = true ? styled({ | ||
target: "div", | ||
const Test2 = true ? styled.div.withConfig({ | ||
displayName: "Test2", | ||
identifier: "Test2-1hn2b5r" | ||
})`` : styled({ | ||
target: "div", | ||
})`` : styled.div.withConfig({ | ||
displayName: "Test2", | ||
identifier: "Test2-1hl3gfs" | ||
})``; | ||
const styles = { One: styled({ | ||
target: "div", | ||
const styles = { One: styled.div.withConfig({ | ||
displayName: "One", | ||
identifier: "One-1r8uh7y" | ||
})`` }; | ||
let Component; | ||
Component = styled({ | ||
target: "div", | ||
Component = styled.div.withConfig({ | ||
displayName: "Component", | ||
identifier: "Component-1e47qp" | ||
})``; | ||
const WrappedComponent = styled({ | ||
target: Inner, | ||
const WrappedComponent = styled(Inner).withConfig({ | ||
displayName: "WrappedComponent", | ||
identifier: "WrappedComponent-kam0ab" | ||
})``; |
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,26 @@ | ||
import s from "styled-components"; | ||
|
||
const Test = s({ | ||
target: "div", | ||
const Test = s.div.withConfig({ | ||
displayName: "Test", | ||
identifier: "Test-62sgar" | ||
})`width: 100%;`; | ||
const Test2 = true ? s({ | ||
target: "div", | ||
const Test2 = true ? s.div.withConfig({ | ||
displayName: "Test2", | ||
identifier: "Test2-1rmo90j" | ||
})`` : s({ | ||
target: "div", | ||
})`` : s.div.withConfig({ | ||
displayName: "Test2", | ||
identifier: "Test2-1e44ey5" | ||
})``; | ||
const styles = { One: s({ | ||
target: "div", | ||
const styles = { One: s.div.withConfig({ | ||
displayName: "One", | ||
identifier: "One-amesrd" | ||
})`` }; | ||
let Component; | ||
Component = s({ | ||
target: "div", | ||
Component = s.div.withConfig({ | ||
displayName: "Component", | ||
identifier: "Component-ohabty" | ||
})``; | ||
const WrappedComponent = s({ | ||
target: Inner, | ||
const WrappedComponent = s(Inner).withConfig({ | ||
displayName: "WrappedComponent", | ||
identifier: "WrappedComponent-1f8r9pi" | ||
})``; |
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,17 +1,14 @@ | ||
import styled from "styled-components"; | ||
|
||
const Test = styled({ | ||
target: "div", | ||
const Test = styled.div.withConfig({ | ||
displayName: "before__Test", | ||
identifier: "before__Test-102oti6" | ||
})`color: red;`; | ||
styled({ | ||
target: "div", | ||
styled.div.withConfig({ | ||
displayName: "before", | ||
identifier: "before-hxqpa7" | ||
})``; | ||
export default styled({ | ||
target: "button", | ||
export default styled.button.withConfig({ | ||
displayName: "before", | ||
identifier: "before-17r4qjq" | ||
})``; |
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