diff --git a/components/auto_inline_icon/commons/auto_inline_icon.lua b/components/auto_inline_icon/commons/auto_inline_icon.lua index aa663d38aac..6a20ba0aa3e 100644 --- a/components/auto_inline_icon/commons/auto_inline_icon.lua +++ b/components/auto_inline_icon/commons/auto_inline_icon.lua @@ -7,7 +7,7 @@ local Class = require('Module:Class') local Lua = require('Module:Lua') -local InlineIconAndText = require('Module:Widget/InlineIconAndText') +local InlineIconAndText = require('Module:Widget/Misc/InlineIconAndText') local ManualData = Lua.requireIfExists('Module:InlineIcon/ManualData', {loadData = true}) local AutoInlineIcon = {} @@ -58,14 +58,14 @@ end ---@return IconWidget function AutoInlineIcon._iconCreator(data) if data.iconType == 'image' then - local IconImage = require('Module:Widget/Icon/Image') + local IconImage = require('Module:Widget/Image/Icon/Image') return IconImage{ imageLight = data.iconLight, imageDark = data.iconDark, link = data.link, } elseif data.iconType == 'fa' then - local IconFa = require('Module:Widget/Icon/Fontawesome') + local IconFa = require('Module:Widget/Image/Icon/Fontawesome') return IconFa{ iconName = data.icon, link = data.link, diff --git a/components/widget/basic/widget_basic_button.lua b/components/widget/basic/widget_basic_button.lua new file mode 100644 index 00000000000..1f803beea70 --- /dev/null +++ b/components/widget/basic/widget_basic_button.lua @@ -0,0 +1,73 @@ +--- +-- @Liquipedia +-- wiki=commons +-- page=Module:Widget/Basic/Button +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Class = require('Module:Class') +local Lua = require('Module:Lua') + +local Widget = Lua.import('Module:Widget') +local HtmlWidgets = Lua.import('Module:Widget/Html/All') +local Link = Lua.import('Module:Widget/Basic/Link') +local Div = HtmlWidgets.Div + +---@class ButtonWidgetParameters +---@field title string? +---@field link string? +---@field linktype 'internal'|'external'|nil +---@field variant 'primary'|'secondary'|'ghost'|nil +---@field size 'sm'|'md'|'lg'|nil + +---@class ButtonWidget: Widget +---@operator call(ButtonWidgetParameters): ButtonWidget + +local Button = Class.new(Widget) + +---@return Widget +function Button:render() + --- MW Parser does not allowed the