Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Salceanu committed Jan 5, 2022
2 parents bd7b2aa + fe51586 commit 3d04220
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const ATTRIBUTES_MAPPINGS = Dict{String,String}(
"iconcolor" => "icon-color",
"iconremove" => "icon-remove",
"iconright" => "icon-right",
"imageclass" => "img-class",
"imagestyle" => "img-style",
"indeterminateicon" => "indeterminate-icon",
"indeterminatevalue" => "indeterminate-value",
"inputclass" => "input-class",
Expand All @@ -59,11 +61,13 @@ const ATTRIBUTES_MAPPINGS = Dict{String,String}(
"minheight" => "min-height",
"maxheight" => "max-height",
"multiline" => "multi-line",
"nativecontextmenu" => "native-context-menu",
"navmaxyearmonth" => "navigation-max-year-month",
"navminyearmonth" => "navigation-min-year-month",
"newvaluemode" => "new-value-mode",
"nobackdrop" => "no-backdrop-dismiss",
"nocaps" => "no-caps",
"nodefaultspinner" => "no-default-spinner",
"noerrorfocus" => "no-error-focus",
"noerroricon" => "no-error-icon",
"noesc" => "no-esc-dismiss",
Expand All @@ -74,12 +78,15 @@ const ATTRIBUTES_MAPPINGS = Dict{String,String}(
"nowrap" => "no-wrap",
"nounset" => "no-unset",
"pagination" => ":pagination.sync",
"placeholdersrc" => "placeholder-src",
"reactiverules" => "reactive-rules",
"reversefillmask" => "reverse-fill-mask",
"rules" => ":rules",
"selected" => ":selected.sync",
"shadowtext" => "shadow-text",
"showifabove" => "show-if-above",
"spinnercolor" => "spinner-color",
"spinnersize" => "spinner-size",
"stacked" => "stack",
"stacklabel" => "stack-label",
"textcolor" => "text-color",
Expand Down
18 changes: 18 additions & 0 deletions src/ImageViews.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module ImageViews

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

export imageview

register_normal_element("q__img", context = @__MODULE__)

function imageview(args...;
wrap::Function = StippleUI.DEFAULT_WRAPPER,
kwargs...)
wrap() do
q__img(args...; attributes([kwargs...], StippleUI.API.ATTRIBUTES_MAPPINGS)...)
end
end

end
2 changes: 2 additions & 0 deletions src/StippleUI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ include("Forms.jl")
include("FormInputs.jl")
include("Headings.jl")
include("Icons.jl")
include("ImageViews.jl")
include("InnerLoaders.jl")
include("Intersections.jl")
include("Knobs.jl")
Expand Down Expand Up @@ -114,6 +115,7 @@ export quasar, quasar_pure, vue, vue_pure, xelem, xelem_pure, @click, csscolors
@reexport using .FormInputs
@reexport using .Headings
@reexport using .Icons
@reexport using .ImageViews
@reexport using .InnerLoaders
@reexport using .Intersections
@reexport using .Knobs
Expand Down

0 comments on commit 3d04220

Please sign in to comment.