diff options
author | 2021-10-15 09:48:06 +0200 | |
---|---|---|
committer | 2021-10-15 09:48:06 +0200 | |
commit | 14d2364fc69e0222133115c55a36286986006098 (patch) | |
tree | 9e9b3c41ef742bbe87ca1632b292c67043051957 /uidev/src/withTheme/index.tsx | |
parent | 5.6.3-nightly.34 [skip ci] (diff) | |
download | ferdium-app-14d2364fc69e0222133115c55a36286986006098.tar.gz ferdium-app-14d2364fc69e0222133115c55a36286986006098.tar.zst ferdium-app-14d2364fc69e0222133115c55a36286986006098.zip |
chore: update eslint setup (#2074)
Diffstat (limited to 'uidev/src/withTheme/index.tsx')
-rw-r--r-- | uidev/src/withTheme/index.tsx | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/uidev/src/withTheme/index.tsx b/uidev/src/withTheme/index.tsx index 5184ff340..0e39b4810 100644 --- a/uidev/src/withTheme/index.tsx +++ b/uidev/src/withTheme/index.tsx | |||
@@ -28,14 +28,22 @@ const styles = (theme: Theme) => ({ | |||
28 | }, | 28 | }, |
29 | }); | 29 | }); |
30 | 30 | ||
31 | const Container = injectSheet(styles)(({ name, classes, story }: { name: string, classes: Classes, story: React.ReactNode }) => ( | 31 | const Container = injectSheet(styles)( |
32 | <article> | 32 | ({ |
33 | <h1 className={classes.title}>{name}</h1> | 33 | name, |
34 | <div className={classes.container}> | 34 | classes, |
35 | {story} | 35 | story, |
36 | </div> | 36 | }: { |
37 | </article> | 37 | name: string; |
38 | )); | 38 | classes: Classes; |
39 | story: React.ReactNode; | ||
40 | }) => ( | ||
41 | <article> | ||
42 | <h1 className={classes.title}>{name}</h1> | ||
43 | <div className={classes.container}>{story}</div> | ||
44 | </article> | ||
45 | ), | ||
46 | ); | ||
39 | 47 | ||
40 | export const WithTheme = ({ children }: { children: React.ReactChild }) => ( | 48 | export const WithTheme = ({ children }: { children: React.ReactChild }) => ( |
41 | <> | 49 | <> |
@@ -43,6 +51,6 @@ export const WithTheme = ({ children }: { children: React.ReactChild }) => ( | |||
43 | <ThemeProvider key={key} theme={theme.variables}> | 51 | <ThemeProvider key={key} theme={theme.variables}> |
44 | <Container story={children} name={theme.name} /> | 52 | <Container story={children} name={theme.name} /> |
45 | </ThemeProvider> | 53 | </ThemeProvider> |
46 | ))} | 54 | ))} |
47 | </> | 55 | </> |
48 | ); | 56 | ); |