Skip to content

Commit 0e65b9d

Browse files
authored
Add storybook
Signed-off-by: GitHub <noreply@github.com>
1 parent 00c51a5 commit 0e65b9d

3 files changed

Lines changed: 47 additions & 2170 deletions

File tree

src/Components/Slot.luau

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
local React = require("../Packages/React")
2+
3+
export type Props = {
4+
toolName: string,
5+
slotNumber: number,
6+
}
7+
8+
local function SlotButton(props: Props)
9+
return React.createElement(
10+
"TextButton",
11+
{
12+
Size = UDim2.new(0, 50, 0, 50),
13+
Text = props.toolName,
14+
},
15+
{
16+
React.createElement("UICorner", {
17+
CornerRadius = UDim.new(0, 8),
18+
}),
19+
},
20+
React.createElement("TextLabel"),
21+
{
22+
Size = UDim2.new(1, 0, 1, 0),
23+
Text = props.slotNumber,
24+
TextXAlignment = Enum.TextXAlignment.Left,
25+
TextYAlignment = Enum.TextYAlignment.Top,
26+
}
27+
)
28+
end
29+
30+
return SlotButton

src/Stories/Slot.story.luau

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
local React = require("../Packages/React")
2+
local ReactRoblox = require("../Packages/ReactRoblox")
3+
4+
local Slot = require("../Components/Slot")
5+
6+
return {
7+
summary = "A generic button component that can be used anywhere",
8+
react = React,
9+
reactRoblox = ReactRoblox,
10+
story = function()
11+
return React.createElement(Slot, {
12+
toolName = "Tool ",
13+
})
14+
end,
15+
}

0 commit comments

Comments
 (0)