1module ThemeStories where
3import Prelude hiding (add)
6import React.Basic.DOM (css)
7import React.Basic.DOM as R
8import React.Basic.Hooks (component, element)
9import Storybook.React (Storybook, add, storiesOf)
10import Theme (fromTheme)
11import Theme.Default (darkTheme, lightTheme)
13stories ∷ Effect Storybook
16 add "The swatches in the themes" mkExample
17 [ { theme: darkTheme, themeName: "Dark theme" }
18 , { theme: lightTheme, themeName: "Light theme" }
23 component "ExampleSwatches" \{ theme, themeName } -> React.do
25 cssTheme = fromTheme theme
27 sw name colour = element swatch { name, colour, fontFamily: cssTheme.textFontFamily }
32 { color: cssTheme.textColour
33 , backgroundColor: cssTheme.backgroundColour
40 , fontFamily: cssTheme.headingFontFamily
41 , padding: "20px 0 30px 10px"
43 , children: [ R.text themeName ]
49 , gridTemplateColumns: "120px 120px 120px 120px 120px 120px"
51 , paddingBottom: "20px"
54 [ sw "IF Darkest" cssTheme.interfaceColourDarkest
55 , sw "IF Darker" cssTheme.interfaceColourDarker
56 , sw "Interface" cssTheme.interfaceColour
57 , sw "IF Lighter" cssTheme.interfaceColourLighter
58 , sw "IF Lightest" cssTheme.interfaceColourLightest
59 , sw "Highlight" cssTheme.highlightColour
60 , sw "TXT Darkest" cssTheme.textColourDarkest
61 , sw "TXT Darker" cssTheme.textColourDarker
62 , sw "TXT" cssTheme.textColour
63 , sw "TXT Lighter" cssTheme.textColourLighter
64 , sw "TXT Lightest" cssTheme.textColourLightest
65 , sw "HighlightDK" cssTheme.highlightColourDark
72 component "Swatch" \{ name, colour, fontFamily } -> React.do
75 { style: css{ display: "flex", flexDirection: "column", alignItems: "center" }
78 { children: [ R.text name ]
79 , style: css{ fontFamily, paddingBottom: "5px" }
87 , outline: "2px solid black"
95 """PureScript is a strongly-typed, purely-functional programming language that compiles"""
96 <> """ to JavaScript. It can be used to develop web applications, server side apps, and al"""
97 <> """so desktop applications with use of Electron. Its syntax is mostly comparable to tha"""
98 <> """t of Haskell. In addition, it introduces row polymorphism and extensible records.[2]"""
99 <> """ Also, contrary to Haskell, PureScript adheres to a strict evaluation strategy."""
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list