Skip to content

Commit af23050

Browse files
authored
Add HintSlot
Signed-off-by: GitHub <noreply@github.com>
1 parent 0498fe7 commit af23050

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

src/Components/HintSlot.luau

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--!strict
2+
3+
local React = require("../../react")
4+
5+
export type Props = {
6+
hintImage: string,
7+
8+
children: any?,
9+
}
10+
11+
local function HintSlotImageLabel(props: Props)
12+
return React.createElement("ImageLabel", {
13+
Image = props.hintImage,
14+
[React.Tag] = "HintSlot",
15+
}, props.children)
16+
end
17+
18+
return HintSlotImageLabel

src/Components/SearchBar.luau

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ local React = require("../../react")
44

55
export type Props = {
66
size: UDim2?,
7+
78
children: any?,
89
}
910

src/Components/Slot.luau

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export type Props = {
1010

1111
equipped: boolean?,
1212
unlocked: boolean?,
13+
1314
children: any?,
1415
}
1516

src/Stories/HintSlot.story.luau

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--!strict
2+
3+
local React = require("../../react")
4+
local ReactRoblox = require("../../react-roblox")
5+
6+
local HintSlot = require("../Components/HintSlot")
7+
8+
local controls = {
9+
HintImage = "rbxasset://textures/ui/Controls/DesignSystem/ButtonX.png",
10+
}
11+
12+
return {
13+
react = React,
14+
reactRoblox = ReactRoblox,
15+
controls = controls,
16+
story = function(props)
17+
local component = React.createElement(HintSlot, {
18+
hintImage = props.controls.HintImage,
19+
}, {
20+
StyleLink = React.createElement("StyleLink", {
21+
StyleSheet = game.ReplicatedStorage.Design.SatchelStyleSheet,
22+
}),
23+
})
24+
25+
return component
26+
end,
27+
}

0 commit comments

Comments
 (0)