mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-24 08:53:33 +03:00
Merge pull request #782 from NoRedInk/tessa/re-org-examples-slightly
Tessa/re org examples slightly
This commit is contained in:
commit
f61a5c8f51
@ -21,17 +21,13 @@ import Sort exposing (Sorter)
|
||||
|
||||
{-| -}
|
||||
type Category
|
||||
= Tables
|
||||
| Inputs
|
||||
= Inputs
|
||||
| Buttons
|
||||
| Icons
|
||||
| Widgets
|
||||
| Layout
|
||||
| Messaging
|
||||
| Modals
|
||||
| Colors
|
||||
| Atoms
|
||||
| Text
|
||||
| Pages
|
||||
| Animations
|
||||
|
||||
|
||||
@ -39,16 +35,12 @@ type Category
|
||||
all : List Category
|
||||
all =
|
||||
[ Animations
|
||||
, Atoms
|
||||
, Buttons
|
||||
, Colors
|
||||
, Icons
|
||||
, Inputs
|
||||
, Layout
|
||||
, Modals
|
||||
, Pages
|
||||
, Tables
|
||||
, Text
|
||||
, Widgets
|
||||
, Messaging
|
||||
]
|
||||
|
||||
@ -58,15 +50,9 @@ all =
|
||||
fromString : String -> Result String Category
|
||||
fromString string =
|
||||
case string of
|
||||
"Tables" ->
|
||||
Ok Tables
|
||||
|
||||
"Inputs" ->
|
||||
Ok Inputs
|
||||
|
||||
"Widgets" ->
|
||||
Ok Widgets
|
||||
|
||||
"Layout" ->
|
||||
Ok Layout
|
||||
|
||||
@ -79,18 +65,12 @@ fromString string =
|
||||
"Messaging" ->
|
||||
Ok Messaging
|
||||
|
||||
"Modals" ->
|
||||
Ok Modals
|
||||
|
||||
"Colors" ->
|
||||
Ok Colors
|
||||
"Atoms" ->
|
||||
Ok Atoms
|
||||
|
||||
"Text" ->
|
||||
Ok Text
|
||||
|
||||
"Pages" ->
|
||||
Ok Pages
|
||||
|
||||
"Animations" ->
|
||||
Ok Animations
|
||||
|
||||
@ -102,15 +82,9 @@ fromString string =
|
||||
forDisplay : Category -> String
|
||||
forDisplay category =
|
||||
case category of
|
||||
Tables ->
|
||||
"Tables"
|
||||
|
||||
Inputs ->
|
||||
"Inputs"
|
||||
|
||||
Widgets ->
|
||||
"Widgets"
|
||||
|
||||
Layout ->
|
||||
"Layout"
|
||||
|
||||
@ -123,18 +97,12 @@ forDisplay category =
|
||||
Messaging ->
|
||||
"Alerts and Messages"
|
||||
|
||||
Modals ->
|
||||
"Modals"
|
||||
|
||||
Colors ->
|
||||
"Colors"
|
||||
Atoms ->
|
||||
"Atoms"
|
||||
|
||||
Text ->
|
||||
"Text and Fonts"
|
||||
|
||||
Pages ->
|
||||
"Pages"
|
||||
|
||||
Animations ->
|
||||
"Animations"
|
||||
|
||||
@ -149,15 +117,9 @@ sorter =
|
||||
forId : Category -> String
|
||||
forId category =
|
||||
case category of
|
||||
Tables ->
|
||||
"tables"
|
||||
|
||||
Inputs ->
|
||||
"inputs"
|
||||
|
||||
Widgets ->
|
||||
"widgets"
|
||||
|
||||
Layout ->
|
||||
"layout"
|
||||
|
||||
@ -170,17 +132,11 @@ forId category =
|
||||
Messaging ->
|
||||
"alerts-and-messages"
|
||||
|
||||
Modals ->
|
||||
"modals"
|
||||
|
||||
Colors ->
|
||||
"colors"
|
||||
Atoms ->
|
||||
"atoms"
|
||||
|
||||
Text ->
|
||||
"text-and-fonts"
|
||||
|
||||
Pages ->
|
||||
"pages"
|
||||
|
||||
Animations ->
|
||||
"animations"
|
||||
|
@ -37,7 +37,7 @@ example : Example State Msg
|
||||
example =
|
||||
{ name = "Colors"
|
||||
, version = 1
|
||||
, categories = [ Colors ]
|
||||
, categories = [ Atoms ]
|
||||
, keyboardSupport = []
|
||||
, state = ()
|
||||
, update = \_ state -> ( state, Cmd.none )
|
||||
|
@ -31,7 +31,7 @@ example : Example State Msg
|
||||
example =
|
||||
{ name = "DisclosureIndicator"
|
||||
, version = 2
|
||||
, categories = [ Widgets ]
|
||||
, categories = [ Icons ]
|
||||
, keyboardSupport = []
|
||||
, state = init
|
||||
, update = update
|
||||
|
@ -31,7 +31,7 @@ example : Example State Msg
|
||||
example =
|
||||
{ name = "Fonts"
|
||||
, version = 1
|
||||
, categories = [ Text ]
|
||||
, categories = [ Text, Atoms ]
|
||||
, keyboardSupport = []
|
||||
, state = ()
|
||||
, update = \_ state -> ( state, Cmd.none )
|
||||
|
@ -89,7 +89,7 @@ example : Example State Msg
|
||||
example =
|
||||
{ name = "Loading"
|
||||
, version = 1
|
||||
, categories = [ Pages ]
|
||||
, categories = [ Animations ]
|
||||
, keyboardSupport = []
|
||||
, state = init
|
||||
, update = update
|
||||
|
@ -33,7 +33,7 @@ example =
|
||||
, state = init
|
||||
, update = update
|
||||
, subscriptions = \_ -> Sub.none
|
||||
, categories = [ Widgets ]
|
||||
, categories = [ Layout ]
|
||||
, keyboardSupport =
|
||||
[ { keys = [ Space ], result = "Opens the menu" }
|
||||
, { keys = [ Enter ], result = "Opens the menu" }
|
||||
|
@ -114,7 +114,7 @@ example : Example State Msg
|
||||
example =
|
||||
{ name = "Modal"
|
||||
, version = 11
|
||||
, categories = [ Modals ]
|
||||
, categories = [ Layout ]
|
||||
, keyboardSupport =
|
||||
[ { keys = [ KeyboardSupport.Tab ]
|
||||
, result = "Moves focus to the next button within the modal or wraps back to the first element within the modal."
|
||||
|
@ -58,7 +58,7 @@ example : Example State Msg
|
||||
example =
|
||||
{ name = "Page"
|
||||
, version = 3
|
||||
, categories = [ Pages ]
|
||||
, categories = [ Messaging ]
|
||||
, keyboardSupport = []
|
||||
, state = { httpError = CommonControls.httpError, recoveryText = initRecoveryText }
|
||||
, update = update
|
||||
|
@ -68,7 +68,7 @@ example =
|
||||
, positioning = options.positioning
|
||||
}
|
||||
]
|
||||
, categories = [ Widgets, Layout ]
|
||||
, categories = [ Layout, Inputs ]
|
||||
, keyboardSupport =
|
||||
[ { keys = [ KeyboardSupport.Tab ]
|
||||
, result = "Move focus to the currently-selected Control's content"
|
||||
|
@ -35,7 +35,7 @@ example : Example State Msg
|
||||
example =
|
||||
{ name = "SlideModal"
|
||||
, version = 2
|
||||
, categories = [ Modals ]
|
||||
, categories = [ Layout ]
|
||||
, keyboardSupport = []
|
||||
, state = init
|
||||
, update = update
|
||||
|
@ -36,7 +36,7 @@ example : Example State Msg
|
||||
example =
|
||||
{ name = "SortableTable"
|
||||
, version = 2
|
||||
, categories = [ Tables, Layout ]
|
||||
, categories = [ Layout ]
|
||||
, keyboardSupport = []
|
||||
, state = init
|
||||
, update = update
|
||||
|
@ -35,7 +35,7 @@ example =
|
||||
, state = ()
|
||||
, update = \_ state -> ( state, Cmd.none )
|
||||
, subscriptions = \_ -> Sub.none
|
||||
, categories = [ Tables, Layout ]
|
||||
, categories = [ Layout ]
|
||||
, keyboardSupport = []
|
||||
, preview =
|
||||
[ Table.view
|
||||
|
@ -29,7 +29,7 @@ example : Example State Msg
|
||||
example =
|
||||
{ name = "Tooltip"
|
||||
, version = 2
|
||||
, categories = [ Widgets ]
|
||||
, categories = [ Messaging ]
|
||||
, keyboardSupport = []
|
||||
, state = init
|
||||
, update = update
|
||||
|
Loading…
Reference in New Issue
Block a user