From 3611fbe4f989a1f4a7083fe0716a09df5eb4e1c0 Mon Sep 17 00:00:00 2001 From: vocksel Date: Mon, 1 Jan 2024 16:10:39 -0800 Subject: [PATCH] Rename RoactSpring to ReactSpring (#232) We're requiring the react-spring package, so the variable name should reflect that --- src/Explorer/Component/Directory.lua | 4 ++-- src/Explorer/Component/Story.lua | 4 ++-- src/Forms/Searchbar.lua | 4 ++-- src/Navigation/Item.lua | 4 ++-- wally.toml | 8 +++++--- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/Explorer/Component/Directory.lua b/src/Explorer/Component/Directory.lua index 7d0e63a1..9d660088 100644 --- a/src/Explorer/Component/Directory.lua +++ b/src/Explorer/Component/Directory.lua @@ -1,7 +1,7 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) -local RoactSpring = require(flipbook.Packages.RoactSpring) +local ReactSpring = require(flipbook.Packages.ReactSpring) local assets = require(flipbook.assets) local constants = require(flipbook.constants) local useTheme = require(flipbook.Common.useTheme) @@ -21,7 +21,7 @@ type Props = { local function Directory(props: Props) local theme = useTheme() local hover, setHover = React.useState(false) - local styles = (RoactSpring.useSpring :: any)({ + local styles = (ReactSpring.useSpring :: any)({ alpha = if hover then 0 else 1, rotation = if props.expanded then 90 else 0, config = constants.SPRING_CONFIG, diff --git a/src/Explorer/Component/Story.lua b/src/Explorer/Component/Story.lua index 685fb35f..ff3c2960 100644 --- a/src/Explorer/Component/Story.lua +++ b/src/Explorer/Component/Story.lua @@ -1,7 +1,7 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) -local RoactSpring = require(flipbook.Packages.RoactSpring) +local ReactSpring = require(flipbook.Packages.ReactSpring) local assets = require(flipbook.assets) local constants = require(flipbook.constants) local useTheme = require(flipbook.Common.useTheme) @@ -20,7 +20,7 @@ type Props = { local function Story(props: Props) local theme = useTheme() local hover, setHover = React.useState(false) - local styles = (RoactSpring.useSpring :: any)({ + local styles = (ReactSpring.useSpring :: any)({ alpha = if not props.active then if hover then 0 else 1 else 0, color = if not props.active then theme.divider else theme.selection, textColor = if not props.active then theme.textFaded else theme.background, diff --git a/src/Forms/Searchbar.lua b/src/Forms/Searchbar.lua index 9a44e069..5fc12818 100644 --- a/src/Forms/Searchbar.lua +++ b/src/Forms/Searchbar.lua @@ -1,7 +1,7 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) -local RoactSpring = require(flipbook.Packages.RoactSpring) +local ReactSpring = require(flipbook.Packages.ReactSpring) local Sift = require(flipbook.Packages.Sift) local assets = require(flipbook.assets) local constants = require(flipbook.constants) @@ -31,7 +31,7 @@ local function Searchbar(props: Props) local isFocused, setIsFocused = React.useState(false) local isExpanded = isFocused or search ~= "" - local styles = (RoactSpring.useSpring :: any)({ + local styles = (ReactSpring.useSpring :: any)({ alpha = if isExpanded then 1 else 0, config = constants.SPRING_CONFIG, }) diff --git a/src/Navigation/Item.lua b/src/Navigation/Item.lua index 6a1ea375..78fe1edc 100644 --- a/src/Navigation/Item.lua +++ b/src/Navigation/Item.lua @@ -1,7 +1,7 @@ local flipbook = script:FindFirstAncestor("flipbook") local React = require(flipbook.Packages.React) -local RoactSpring = require(flipbook.Packages.RoactSpring) +local ReactSpring = require(flipbook.Packages.ReactSpring) local constants = require(flipbook.constants) local useTheme = require(flipbook.Common.useTheme) @@ -19,7 +19,7 @@ local function Item(props: Props) local theme = useTheme() local hover, setHover = React.useState(false) - local styles = (RoactSpring.useSpring :: any)({ + local styles = (ReactSpring.useSpring :: any)({ alpha = if not props.active and hover then 0 else 1, config = constants.SPRING_CONFIG, }) diff --git a/wally.toml b/wally.toml index ecc1a169..0fbe2165 100644 --- a/wally.toml +++ b/wally.toml @@ -7,11 +7,13 @@ realm = "shared" exclude = ["*"] [dependencies] -Roact = "roblox/roact@1.4.4" +ModuleLoader = "flipbook-labs/module-loader@0.6.1" React = "jsdotlua/react@17.0.2" ReactRoblox = "jsdotlua/react-roblox@17.0.2" +ReactSpring = "chriscerie/react-spring@2.0.0" Sift = "csqrl/sift@0.0.4" t = "osyrisrblx/t@3.0.0" -ModuleLoader = "flipbook-labs/module-loader@0.6.1" + +# dev dependencies +Roact = "roblox/roact@1.4.4" TestEZ = "roblox/testez@0.4.1" -RoactSpring = "chriscerie/react-spring@2.0.0"