Skip to content

Commit

Permalink
InnerLoader and ScrollArea components
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Salceanu committed Nov 21, 2021
1 parent ef8a228 commit 6ae40d6
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
26 changes: 26 additions & 0 deletions src/InnerLoaders.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module InnerLoaders

using Genie, Stipple, StippleUI, StippleUI.API
import Genie.Renderer.Html: HTMLString, normal_element, register_normal_element

export innerloader

register_normal_element("q__inner__loading", context = @__MODULE__)

function innerloader(label::String = "",
state::Union{Symbol,Nothing} = nothing,
args...;
wrap::Function = StippleUI.DEFAULT_WRAPPER,
kwargs...)

wrap() do
q__inner__loading( args...;
attributes(
[ Symbol(":state") => state,
:label => label,
kwargs...
], StippleUI.API.ATTRIBUTES_MAPPINGS)...)
end
end

end
16 changes: 16 additions & 0 deletions src/ScrollAreas.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module ScrollAreas

using Genie, Stipple, StippleUI, StippleUI.API
import Genie.Renderer.Html: HTMLString, normal_element, template, register_normal_element

export scrollarea

register_normal_element("q__scroll__area", context = @__MODULE__)

function scrollarea(args...; wrap::Function = StippleUI.DEFAULT_WRAPPER, kwargs...)
wrap() do
q__scroll__area(args...; kwargs...)
end
end

end
2 changes: 1 addition & 1 deletion src/Spinners.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function spinner(spinner_type::Union{String,Symbol} = "",
kwargs...)

wrap() do
getfield(Genie.Renderer.Html, Symbol("q__spinner$(isempty(string(spinner_type)) ? "" : "__")$spinner_type"))(args...; kwargs...)
getfield(@__MODULE__, Symbol("q__spinner$(isempty(string(spinner_type)) ? "" : "__")$spinner_type"))(args...; kwargs...)
end
end

Expand Down
4 changes: 4 additions & 0 deletions src/StippleUI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,15 @@ include("Forms.jl")
include("FormInputs.jl")
include("Headings.jl")
include("Icons.jl")
include("InnerLoaders.jl")
include("Intersections.jl")
include("Knobs.jl")
include("Layouts.jl")
include("Lists.jl")
include("Menus.jl")
include("Radios.jl")
include("Ranges.jl")
include("ScrollAreas.jl")
include("Selects.jl")
include("Separators.jl")
include("Spaces.jl")
Expand Down Expand Up @@ -110,12 +112,14 @@ export quasar, quasar_pure, vue, vue_pure, xelem, xelem_pure, @click, csscolors
@reexport using .FormInputs
@reexport using .Headings
@reexport using .Icons
@reexport using .InnerLoaders
@reexport using .Intersections
@reexport using .Knobs
@reexport using .Lists
@reexport using .Menus
@reexport using .Radios
@reexport using .Ranges
@reexport using .ScrollAreas
@reexport using .Selects
@reexport using .Separators
@reexport using .Spaces
Expand Down

4 comments on commit 6ae40d6

@essenciary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/49125

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.11.0 -m "<description of version>" 6ae40d6c9c06198070e8db6baa24ed908397140c
git push origin v0.11.0

@essenciary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/49125

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.11.0 -m "<description of version>" 6ae40d6c9c06198070e8db6baa24ed908397140c
git push origin v0.11.0

Please sign in to comment.