Lumi.Components
- Package
- purescript-lumi-components
- Repository
- lumihq/purescript-lumi-components
#PropsModifier Source
type PropsModifier props = PropsModifier' props props
#PropsModifier' Source
type PropsModifier' props props' = (LumiProps props -> LumiProps props) -> (LumiProps props' -> LumiProps props')
#propsModifier Source
propsModifier :: forall props. (LumiProps props -> LumiProps props) -> PropsModifier props
Lift a props -> props
function for composition with other PropsModifier
functions.
#LumiComponent Source
type LumiComponent props = (LumiProps props -> LumiProps props) -> JSX
A LumiComponent
takes a function that updates its default props instead
of the plain record of props itself. This helps reduce the surface area for
API updates:
React.Basic.element reactComponent
{ relevantProp, otherProp1: mempty, otherProp2: mempty, ...etc }
-- vs
lumiComponent _{ relevantProp = relevantProp }
#lumiComponent Source
lumiComponent :: forall props hooks. Lacks "children" props => Lacks "key" props => Lacks "ref" props => String -> Record props -> (LumiProps props -> Render Unit hooks JSX) -> Effect (LumiComponent props)
Create a LumiComponent
from a name, set of defaults, and a render function.
The render function behaves the same as in the hooks API.
#lumiComponentFromHook Source
lumiComponentFromHook :: forall r props hooks. Lacks "children" props => Lacks "key" props => Lacks "ref" props => String -> { render :: r -> JSX | props } -> (LumiProps (render :: r -> JSX | props) -> Hook hooks r) -> Effect (LumiComponent (render :: r -> JSX | props))
Create a LumiComponent
from a react hook.
This operation is useful for creating components that enhance a JSX tree
with capabilities given by the Hook used.
#withContent Source
withContent :: forall r content props. ((LumiProps (content :: content | props) -> LumiProps (content :: content | props)) -> r) -> content -> r
#($$$) Source
Operator alias for Lumi.Components.withContent (right-associative / precedence 0)
A convenient alias for setting the content
property of a Lumi component
if it exists.
#unsafeMaybeToNullableAttr Source
unsafeMaybeToNullableAttr :: forall a. Maybe a -> a
WARNING: This is for JS interop -- don't use this to unwrap Maybes!
Unsafely nulls out a value so the resulting html attributes are less noisy
Ex: R.input { type: unsafeMaybeToNullableAttr Nothing }
avoids rendering
the type
attribute while still validating the type of the Maybe's content
matches the type of the DOM field. It's only slightly safer than using
unsafeCreateDOMComponent
to avoid DOM type checking entirely.
- Modules
- JSS
- Lumi.
Components - Lumi.
Components. Badge - Lumi.
Components. Border - Lumi.
Components. Breadcrumb - Lumi.
Components. Button - Lumi.
Components. ButtonGroup - Lumi.
Components. Card - Lumi.
Components. CardGrid - Lumi.
Components. Color - Lumi.
Components. Column - Lumi.
Components. Details - Lumi.
Components. Divider - Lumi.
Components. DropdownButton - Lumi.
Components. EditableTable - Lumi.
Components. FetchCache - Lumi.
Components. FixedPrecisionInput - Lumi.
Components. Form - Lumi.
Components. Form. Defaults - Lumi.
Components. Form. Internal - Lumi.
Components. Form. Table - Lumi.
Components. Form. Validation - Lumi.
Components. Icon - Lumi.
Components. Images - Lumi.
Components. Input - Lumi.
Components. InputGroup - Lumi.
Components. LabeledField - Lumi.
Components. Layouts - Lumi.
Components. Layouts. Centered - Lumi.
Components. Layouts. OneColumnWithHeader - Lumi.
Components. Layouts. Tabs - Lumi.
Components. Link - Lumi.
Components. List - Lumi.
Components. Loader - Lumi.
Components. Lockup - Lumi.
Components. Modal - Lumi.
Components. NativeSelect - Lumi.
Components. Navigation - Lumi.
Components. Orientation - Lumi.
Components. Pagination - Lumi.
Components. Pill - Lumi.
Components. Progress - Lumi.
Components. Responsive - Lumi.
Components. Row - Lumi.
Components. Select - Lumi.
Components. Select. Backend - Lumi.
Components. Size - Lumi.
Components. Slider - Lumi.
Components. Spacing - Lumi.
Components. Status - Lumi.
Components. StatusSlat - Lumi.
Components. Styles - Lumi.
Components. Svg - Lumi.
Components. Tab - Lumi.
Components. Table - Lumi.
Components. Table. FilterDropdown - Lumi.
Components. Text - Lumi.
Components. Textarea - Lumi.
Components. Toast - Lumi.
Components. Tooltip - Lumi.
Components. Upload - Lumi.
Components. Utility. ReactRouter - Lumi.
Components. Wizard - Lumi.
Components. ZIndex - Lumi.
Components2. Box - Lumi.
Components2. Button - Lumi.
Components2. ButtonGroup - Lumi.
Components2. Clip - Lumi.
Components2. Image - Lumi.
Components2. Link - Lumi.
Components2. QRCode - Lumi.
Components2. ScrollObserver - Lumi.
Components2. Slat - Lumi.
Components2. Text - Lumi.
Styles - Lumi.
Styles. Border - Lumi.
Styles. Box - Lumi.
Styles. Clip - Lumi.
Styles. Link - Lumi.
Styles. Loader - Lumi.
Styles. Responsive - Lumi.
Styles. Slat - Lumi.
Styles. Theme