Skip to content

Commit

Permalink
1.0.1 release - fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Campbell authored and Cameron Campbell committed Sep 12, 2024
1 parent 0bad526 commit dcbf84e
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@

/Packages/

/docs_site/
/docs_site/

/*.git

/*.zip

/*.rbxm
9 changes: 8 additions & 1 deletion src/Components/Button.luau
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,16 @@ return Component(function(scope, props: ButtonProps)
Text = text,
Focus = "Title" :: "Title",
Weight = Enum.FontWeight.SemiBold,
Size = UDim2.fromScale(1, 1),
Size = UDim2.fromScale(0, 1),
AutomaticSize = Enum.AutomaticSize.X,
TextXAlignment = Enum.TextXAlignment.Center
}),

scope:New "UIListLayout" {
FillDirection = Enum.FillDirection.Horizontal,
HorizontalAlignment = Enum.HorizontalAlignment.Center,
VerticalAlignment = Enum.VerticalAlignment.Center,
},

scope:New "UIPadding" { PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8) },
}
Expand Down
10 changes: 8 additions & 2 deletions src/Components/TextInput.luau
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ local Fusion = require(Packages.Fusion)
type TextInputProps = {
Width: Fusion.UsedAs<UDim>?,
Placeholder: Fusion.UsedAs<string?>,
Value: Fusion.UsedAs<string?>
Value: Fusion.UsedAs<string?>,
Variant: Fusion.UsedAs<"Primary" | "Secondary" | nil>?
}
-------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -60,10 +61,15 @@ end

return Component(function(scope, props: TextInputProps)
local width = TableTake(props, "Width", UDim.new(1,0)) :: Fusion.UsedAs<UDim>
local variant = TableTake(props, "Variant")
local placeholder, value = TableTake(props, "Placeholder", "Text Input"), TableTake(props, "Value")

local isHoverState, isFocusState = scope:Value(false), scope:Value(false)

local computeBackgroundColor = scope:GetThemeItem(scope:Computed(function(use)
return `Background/{use(variant) == "Secondary" and "Tertiary" or "Secondary"}` :: any
end))

local computeStrokeColor = scope:GetThemeItem(
scope:Computed(function(use)
return (use(isFocusState) and "Accent/Primary" or "Background/Stroke") :: any
Expand All @@ -75,7 +81,7 @@ return Component(function(scope, props: TextInputProps)
As = "ImageButton" :: "ImageButton",
Size = ComputeUDim2(scope, width, UDim.new(0, 25)),
Image = "rbxassetid://116342589966879",
BackgroundColor3 = scope:GetThemeItem("Background/Secondary"),
BackgroundColor3 = computeBackgroundColor,
Name = "TextInput",

[Children] = {
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/ThemeHandler/DefaultThemes.luau
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ local Dark: Types.ThemeConfig = {
Primary = Color3.fromHex "#171717",
Secondary = Color3.fromHex "#252525",
Tertiary = Color3.fromHex "#2D2D2D",
Stroke = Color3.fromHex "#323232"
Stroke = Color3.fromHex "#363636"
},

Text = {
Expand Down
16 changes: 16 additions & 0 deletions test/Main.server.luau
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,23 @@ Scope:Widget {
FloatXSize = 300, FloatYSize = 800,

[Children] = {
Scope:TextInput {

},

Scope:Container {
Header = { Text = "Preview" },
LayoutOrder = 0,

[Children] = Scope:ImageBackground {
Size = UDim2.new(1,0, 0,225),
ImageSource = "rbxassetid://89904945503839",
ImageSourceSize = Vector3.new(256, 0, 256)
}
},

Scope:Button {
Width = UDim.new(.5, 0),
Text = "Click Me!",
Variant = "Primary" :: "Primary"
},
Expand Down
2 changes: 1 addition & 1 deletion wally.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cameronpcampbell/ignite"
description="⚡ A beautiful component system for Roblox plugin development."
version = "1.0.0"
version = "1.0.1"
registry = "https://github.com/UpliftGames/wally-index"
realm = "shared"
license = "MIT"
Expand Down

0 comments on commit dcbf84e

Please sign in to comment.