-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add spritesheet icon support * refactor baseicon * update changelog * fix storybook for luau-analyze * fix doc comments * fix dropdown item icon alignment --------- Co-authored-by: sircfenner <sircfenner@users.noreply.github.com>
- Loading branch information
1 parent
4ed1141
commit 32e4f05
Showing
9 changed files
with
114 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
local React = require("@pkg/@jsdotlua/react") | ||
|
||
local CommonProps = require("../../CommonProps") | ||
|
||
export type BaseIconConsumerProps = CommonProps.T & { | ||
Image: string, | ||
Transparency: number?, | ||
Color: Color3?, | ||
ResampleMode: Enum.ResamplerMode?, | ||
RectOffset: Vector2?, | ||
RectSize: Vector2?, | ||
} | ||
|
||
export type BaseIconProps = BaseIconConsumerProps | ||
|
||
local function BaseIcon(props: BaseIconProps) | ||
return React.createElement("ImageLabel", { | ||
Size = props.Size, | ||
Position = props.Position, | ||
AnchorPoint = props.AnchorPoint, | ||
LayoutOrder = props.LayoutOrder, | ||
ZIndex = props.ZIndex, | ||
BackgroundTransparency = 1, | ||
Image = props.Image, | ||
ImageColor3 = props.Color, | ||
ImageTransparency = 1 - (1 - (props.Transparency or 0)) * (1 - if props.Disabled then 0.2 else 0), | ||
ImageRectOffset = props.RectOffset, | ||
ImageRectSize = props.RectSize, | ||
ResampleMode = props.ResampleMode, | ||
}) | ||
end | ||
|
||
return BaseIcon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--!nocheck | ||
|
||
local React = require("@pkg/@jsdotlua/react") | ||
local ReactRoblox = require("@pkg/@jsdotlua/react-roblox") | ||
|
||
return { | ||
name = "StudioComponents", | ||
storyRoots = { | ||
script.Parent.Parent, | ||
}, | ||
packages = { | ||
React = React, | ||
ReactRoblox = ReactRoblox, | ||
}, | ||
} |