-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b34af7
commit 3ae82dc
Showing
3 changed files
with
208 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "Lucide Storybooks", | ||
"tree": { | ||
"$className": "DataModel", | ||
|
||
"ServerStorage": { | ||
"$className": "ServerStorage", | ||
|
||
"Lucide Storybooks": { | ||
"$path": "stories", | ||
|
||
"Lucide": { | ||
"$path": "default.project.json" | ||
} | ||
} | ||
} | ||
} | ||
} |
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,55 @@ | ||
-- MIT License | Copyright (c) 2023 Latte Softworks <https://latte.to> | ||
|
||
local Lucide = require(script.Parent.Lucide) | ||
|
||
local function ApplyToInstance(object: Instance, properties: {[string]: any}): Instance | ||
if properties then | ||
for Property, Value in properties do | ||
if Property ~= "Parent" then | ||
object[Property] = Value | ||
end | ||
end | ||
|
||
if properties.Parent then | ||
object.Parent = properties.Parent | ||
end | ||
end | ||
|
||
return object | ||
end | ||
|
||
return function(target: Frame) | ||
local InnerFrame = ApplyToInstance(Instance.new("ScrollingFrame"), { | ||
Position = UDim2.fromOffset(20, 20), | ||
Size = UDim2.new(1, -40, 1, 0), | ||
|
||
BackgroundTransparency = 1, | ||
BorderSizePixel = 0, | ||
|
||
ScrollingDirection = Enum.ScrollingDirection.Y, | ||
AutomaticCanvasSize = Enum.AutomaticSize.Y, | ||
CanvasSize = UDim2.fromOffset(0, 0), | ||
ScrollBarThickness = 8, | ||
|
||
--BottomImage = "", | ||
--MidImage = "", | ||
--TopImage = "", | ||
}) | ||
|
||
ApplyToInstance(Instance.new("UIGridLayout"), { | ||
Parent = InnerFrame, | ||
|
||
CellSize = UDim2.fromOffset(48, 48), | ||
CellPadding = UDim2.fromOffset(10, 10), | ||
|
||
HorizontalAlignment = Enum.HorizontalAlignment.Center, | ||
}) | ||
|
||
InnerFrame.Parent = target | ||
|
||
for _, IconName in Lucide.IconNames do | ||
Lucide.ImageLabel(IconName, 48, { | ||
Parent = InnerFrame | ||
}) | ||
end | ||
end |