Skip to content

Commit

Permalink
theme patch
Browse files Browse the repository at this point in the history
  • Loading branch information
nightcycle committed Jul 9, 2024
1 parent bd6dd08 commit ba821fd
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 45 deletions.
4 changes: 2 additions & 2 deletions src/Component/Slider/ColdFusion.luau
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function Interface.onTertiary(
_import(elevation, DEFAULTS.ON_TERTIARY.INITIAL_VALUE),
_import(elevation, DEFAULTS.ON_TERTIARY.MINIMUM),
_import(elevation, DEFAULTS.ON_TERTIARY.MAXIMUM),
_import(elevation, DEFAULTS.ON_TERTIARY.INCREMENT or 0),
_import(elevation, DEFAULTS.ON_TERTIARY.INCREMENT),
_import(leftTextOrIcon, DEFAULTS.ON_TERTIARY.LEFT_TEXT_OR_ICON),
_import(rightTextOrIcon, DEFAULTS.ON_TERTIARY.RIGHT_TEXT_OR_ICON),
_Computed(function(s: Style): Color3
Expand Down Expand Up @@ -383,7 +383,7 @@ function Interface.secondary(
_Computed(function(s: Style): Color3
return s:GetColor(Enums.ColorRoleType.SecondaryContainer)
end, styleState),
_import(elevation, DEFAULTS.SECONDARY.ELEVATION or 0),
_import(elevation, DEFAULTS.SECONDARY.ELEVATION),
_Computed(function(s: Style): any
return s.SchemeType
end, styleState),
Expand Down
12 changes: 6 additions & 6 deletions src/Component/Slider/Fusion.luau
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function Interface.primary(
increment: FusionCanBeState<number?>,
leftTextOrIcon: FusionCanBeState<((string | ImageData)?)>,
rightTextOrIcon: FusionCanBeState<((string | ImageData)?)>,
elevation: FusionCanBeState<number>
elevation: FusionCanBeState<number?>
): GuiObject
local maid = Maid.new()
local _fuse = ColdFusion.fuse(maid)
Expand Down Expand Up @@ -120,7 +120,7 @@ function Interface.secondary(
increment: FusionCanBeState<number?>,
leftTextOrIcon: FusionCanBeState<((string | ImageData)?)>,
rightTextOrIcon: FusionCanBeState<((string | ImageData)?)>,
elevation: FusionCanBeState<number>
elevation: FusionCanBeState<number?>
): GuiObject
local maid = Maid.new()
local _fuse = ColdFusion.fuse(maid)
Expand Down Expand Up @@ -153,7 +153,7 @@ function Interface.tertiary(
increment: FusionCanBeState<number?>,
leftTextOrIcon: FusionCanBeState<((string | ImageData)?)>,
rightTextOrIcon: FusionCanBeState<((string | ImageData)?)>,
elevation: FusionCanBeState<number>
elevation: FusionCanBeState<number?>
): GuiObject
local maid = Maid.new()
local _fuse = ColdFusion.fuse(maid)
Expand Down Expand Up @@ -186,7 +186,7 @@ function Interface.onPrimary(
increment: FusionCanBeState<number?>,
leftTextOrIcon: FusionCanBeState<((string | ImageData)?)>,
rightTextOrIcon: FusionCanBeState<((string | ImageData)?)>,
elevation: FusionCanBeState<number>
elevation: FusionCanBeState<number?>
): GuiObject
local maid = Maid.new()
local _fuse = ColdFusion.fuse(maid)
Expand Down Expand Up @@ -219,7 +219,7 @@ function Interface.onSecondary(
increment: FusionCanBeState<number?>,
leftTextOrIcon: FusionCanBeState<((string | ImageData)?)>,
rightTextOrIcon: FusionCanBeState<((string | ImageData)?)>,
elevation: FusionCanBeState<number>
elevation: FusionCanBeState<number?>
): GuiObject
local maid = Maid.new()
local _fuse = ColdFusion.fuse(maid)
Expand Down Expand Up @@ -252,7 +252,7 @@ function Interface.onTertiary(
increment: FusionCanBeState<number?>,
leftTextOrIcon: FusionCanBeState<((string | ImageData)?)>,
rightTextOrIcon: FusionCanBeState<((string | ImageData)?)>,
elevation: FusionCanBeState<number>
elevation: FusionCanBeState<number?>
): GuiObject
local maid = Maid.new()
local _fuse = ColdFusion.fuse(maid)
Expand Down
6 changes: 3 additions & 3 deletions src/Component/Slider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ This function is a style constructor, utilizing the "Style" type to reduce the n
- **increment**: number?
- **leftTextOrIcon**: ((string | ImageData)?)
- **rightTextOrIcon**: ((string | ImageData)?)
- **elevation**: number
- **elevation**: number?


### Usage
Expand All @@ -128,7 +128,7 @@ local maximum: number? = 100
local increment: number? = 10
local leftTextOrIcon: ((string | ImageData)?) = nil
local rightTextOrIcon: ((string | ImageData)?) = nil
local elevation: number = 0
local elevation: number? = 0
local slider = Synthetic.Component.Slider.Fusion.primary()
slider.Style = style
Expand All @@ -152,7 +152,7 @@ local maximumState: Fusion.Value<number?> = Value(100)
local increment: number? = 10
local leftTextOrIconState: Fusion.Value<((string | ImageData)?)> = Value(nil)
local rightTextOrIcon: ((string | ImageData)?) = nil
local elevationState: Fusion.Value<number> = Value(0)
local elevationState: Fusion.Value<number?> = Value(0)
local slider: GuiObject = Synthetic.Component.Slider.Fusion.primary(
styleState,
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Slider/Wrapper.luau
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export type StyledSliderWrapperDefinition = {
Increment: number?,
LeftTextOrIcon: (string | ImageData)?,
RightTextOrIcon: (string | ImageData)?,
Elevation: number,
Elevation: number?,
}
export type StyledSliderWrapper = Wrapper<GuiObject, StyledSliderWrapperDefinition, "StyledSlider">
-- Constants
Expand Down
64 changes: 32 additions & 32 deletions src/Component/Slider/_Theme.story.luau
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ return function(frame: Frame)
task.spawn(function()
local function makeHalfFrame(isDarkMode: boolean, color: Color3): Frame
local style = Style.new(
1,
1.25,
Enum.Font.SourceSans,
if isDarkMode then Enums.SchemeType.Dark else Enums.SchemeType.Light,
color
Expand All @@ -40,39 +40,39 @@ return function(frame: Frame)
do
local button = maid:GiveTask(Module.ColdFusion.primary(style, function(val: number)
print(`value={val}`)
end, 50, 0, 100, 25, nil, nil, 1))
button.Parent = halfFrame
end
do
local button = maid:GiveTask(Module.ColdFusion.secondary(style, function(val: number)
print(`value={val}`)
end, 50, 0, 100, 25, nil, nil, 1))
button.Parent = halfFrame
end
do
local button = maid:GiveTask(Module.ColdFusion.tertiary(style, function(val: number)
print(`value={val}`)
end, 50, 0, 100, 25, nil, nil, 1))
button.Parent = halfFrame
end
do
local button = maid:GiveTask(Module.ColdFusion.onPrimary(style, function(val: number)
print(`value={val}`)
end, 50, 0, 100, 25, nil, nil, 1))
button.Parent = halfFrame
end
do
local button = maid:GiveTask(Module.ColdFusion.onSecondary(style, function(val: number)
print(`value={val}`)
end, 50, 0, 100, 25, nil, nil, 1))
button.Parent = halfFrame
end
do
local button = maid:GiveTask(Module.ColdFusion.onTertiary(style, function(val: number)
print(`value={val}`)
end, 50, 0, 100, 25, nil, nil, 1))
end, 50, 0, 100, 25))
button.Parent = halfFrame
end
-- do
-- local button = maid:GiveTask(Module.ColdFusion.secondary(style, function(val: number)
-- print(`value={val}`)
-- end, 50, 0, 100, 25, nil, nil, 1))
-- button.Parent = halfFrame
-- end
-- do
-- local button = maid:GiveTask(Module.ColdFusion.tertiary(style, function(val: number)
-- print(`value={val}`)
-- end, 50, 0, 100, 25, nil, nil, 1))
-- button.Parent = halfFrame
-- end
-- do
-- local button = maid:GiveTask(Module.ColdFusion.onPrimary(style, function(val: number)
-- print(`value={val}`)
-- end, 50, 0, 100, 25, nil, nil, 1))
-- button.Parent = halfFrame
-- end
-- do
-- local button = maid:GiveTask(Module.ColdFusion.onSecondary(style, function(val: number)
-- print(`value={val}`)
-- end, 50, 0, 100, 25, nil, nil, 1))
-- button.Parent = halfFrame
-- end
-- do
-- local button = maid:GiveTask(Module.ColdFusion.onTertiary(style, function(val: number)
-- print(`value={val}`)
-- end, 50, 0, 100, 25, nil, nil, 1))
-- button.Parent = halfFrame
-- end
return halfFrame
end

Expand Down
2 changes: 1 addition & 1 deletion src/Component/Slider/definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
},
{
"name": "elevation",
"type": "number",
"type": "number?",
"default": "0"
}
]
Expand Down

0 comments on commit ba821fd

Please sign in to comment.