-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaned up typing, DRY props with interface extension, fix persistent…
… type errors in Storybook
- Loading branch information
1 parent
f814492
commit c7183b1
Showing
9 changed files
with
58 additions
and
169 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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { withTheme } from 'styled-components'; | ||
import Code from './components/Code'; | ||
import Code, { CodeProps } from './components/Code'; | ||
|
||
export default withTheme(Code); | ||
// HELP WANTED: I don't understand why this forced typing is necessary for CopyBlock and Code, but not CodeBlock | ||
export default withTheme(Code) as (props: CodeProps) => JSX.Element; |
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,3 +1,5 @@ | ||
import { withTheme } from 'styled-components'; | ||
import CopyBlock from './components/CopyBlock'; | ||
export default withTheme(CopyBlock); | ||
import CopyBlock, { CopyBlockProps } from './components/CopyBlock'; | ||
|
||
// HELP WANTED: I don't understand why this forced typing is necessary for CopyBlock and Code, but not CodeBlock | ||
export default withTheme(CopyBlock) as (props: CopyBlockProps) => JSX.Element; |
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
Oops, something went wrong.