Skip to content

Commit

Permalink
Merge pull request #42 from AbhimanyuAryan/master
Browse files Browse the repository at this point in the history
imageview for q-img API support
  • Loading branch information
essenciary authored Jan 3, 2022
2 parents cacfc9d + a710f01 commit fe51586
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

2 comments on commit fe51586

@essenciary
Copy link
Member Author

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/51712

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.14.0 -m "<description of version>" fe5158616607742c137250a14c4cdf9c5525dd0f
git push origin v0.14.0

Please sign in to comment.