--[=[
	@within Plasma
	@function label
	@param text string
	@tag widgets

	Text.
]=]

return Runtime.widget(function(text)
	local refs = Runtime.useInstance(function(ref)
		local style = Style.get()

		create("TextLabel", {
			[ref] = "label",
			BackgroundTransparency = 1,
			Font = Enum.Font.SourceSans,
			TextColor3 = style.textColor,
			TextSize = 20,
			RichText = true,
		})

		automaticSize(ref.label)

		return ref.label
	end)

	refs.label.Text = text
end)
