-- Compiled with roblox-ts v1.2.7 local TS = _G[script] local Roact = TS.import(script, TS.getModule(script, "@rbxts", "roact").src) local ThemeContext = TS.import(script, script.Parent.Parent, "UIKit", "ThemeContext").default local ZirconIcon = TS.import(script, script.Parent, "Icon").default local Padding = TS.import(script, script.Parent, "Padding").default local SearchTextBox do SearchTextBox = Roact.Component:extend("SearchTextBox") function SearchTextBox:init(props) self.state = { Value = props.Value, } end function SearchTextBox:render() local _binding = self.props local Size = _binding.Size if Size == nil then Size = UDim2.new(0, 400, 0, 30) end return Roact.createElement(ThemeContext.Consumer, { render = function(theme) local _attributes = { Size = Size, BackgroundTransparency = 1, } local _children = { Roact.createElement("UIListLayout", { FillDirection = "Horizontal", HorizontalAlignment = "Right", Padding = UDim.new(0, 2), }), Roact.createElement("Frame", { Size = UDim2.new(0, 30, 0, 30), BackgroundColor3 = theme.PrimaryBackgroundColor3, BorderColor3 = theme.SecondaryBackgroundColor3, }, { Roact.createElement("UIListLayout", { VerticalAlignment = "Center", HorizontalAlignment = "Center", }), Roact.createElement(ZirconIcon, { Icon = "Funnel", }), }), } local _length = #_children local _attributes_1 = { BackgroundColor3 = theme.SecondaryBackgroundColor3, BorderColor3 = theme.SecondaryBackgroundColor3, Size = UDim2.new(0, 400, 0, 30), } local _children_1 = { Roact.createElement(Padding, { Padding = { Horizontal = 5, Vertical = 5, }, }), } local _length_1 = #_children_1 local _attributes_2 = { Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, TextColor3 = theme.PrimaryTextColor3, TextSize = 18, PlaceholderText = "Find", PlaceholderColor3 = theme.SecondaryTextColor3, } local _condition = self.state.Value if _condition == nil then _condition = "" end _attributes_2.Text = _condition _attributes_2.TextXAlignment = "Left" _attributes_2[Roact.Change.Text] = function(_param) local Text = _param.Text self:setState({ Value = Text, }) local _result = self.props.TextChanged if _result ~= nil then _result(Text) end end _attributes_2.Font = theme.ConsoleFont _children_1[_length_1 + 1] = Roact.createElement("TextBox", _attributes_2) _children[_length + 1] = Roact.createElement("Frame", _attributes_1, _children_1) return Roact.createElement("Frame", _attributes, _children) end, }) end end return { default = SearchTextBox, }