View Source LiveUI.Components.Core (LiveUI v0.1.0)
Core components.
Summary
Functions
Renders action button.
Renders component for an action.
A button that switches between light and dark modes.
Used for switching dark/light color schemes.
Taken from phoenix core.
Taken from phoenix core.
Taken from phoenix core.
Taken from phoenix core.
Renders link to parent record.
Taken from phoenix core.
Taken from phoenix core.
Functions
Renders action button.
Attributes
config
(:list
)action
(:atom
)url_path
(:string
)disabled
(:boolean
) - Defaults tofalse
.color
(:string
) - Defaults to"white"
.
Slots
inner_block
(required)
Renders component for an action.
Attributes
live_action
(:atom
) (required)action
(:atom
) (required)return_to
(:string
) (required)
Slots
inner_block
(required)header
subheader
A button that switches between light and dark modes.
Pairs with css-theme-switch.js
<.color_scheme_switch_js />
Used for switching dark/light color schemes.
This needs to be inlined in the <head> because it will set a class on the document, which affects all "dark" prefixed classed (eg. dark:text-white). If you do this in the body or a separate javascript file then when in dark mode, the page will flash in light mode first before switching to dark mode.
Utilized by color-scheme-hook.js
.
<.color_scheme_switch_js />
Taken from phoenix core.
Taken from phoenix core.
Taken from phoenix core.
Attributes
name
(:string
) (required)class
(:string
) - Defaults tonil
.
Taken from phoenix core.
Attributes
id
(:string
) (required)show
(:boolean
) - Defaults tofalse
.on_cancel
(Phoenix.LiveView.JS
) - Defaults to%Phoenix.LiveView.JS{ops: []}
.class
(:string
) - Defaults tonil
.
Slots
inner_block
(required)
Renders link to parent record.
Attributes
record
(:map
)
Taken from phoenix core.
Taken from phoenix core.