diff --git a/docs/examples/cookbook/button-component.md b/docs/examples/cookbook/button-component.md index 947921dc7..597b4dbd7 100644 --- a/docs/examples/cookbook/button-component.md +++ b/docs/examples/cookbook/button-component.md @@ -32,7 +32,7 @@ local ROUNDED_CORNERS = UDim.new(0, 4) local PADDING = UDim2.fromOffset(6, 4) local function Button( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Name: UsedAs?, Layout: { @@ -139,7 +139,7 @@ readable documentation. ```Lua local function Button( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Name: UsedAs?, Layout: { diff --git a/docs/examples/cookbook/drag-and-drop.md b/docs/examples/cookbook/drag-and-drop.md index e8892a333..49631168c 100644 --- a/docs/examples/cookbook/drag-and-drop.md +++ b/docs/examples/cookbook/drag-and-drop.md @@ -21,7 +21,7 @@ type DragInfo = { } local function Draggable( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { ID: string, Name: UsedAs?, @@ -157,7 +157,7 @@ local function getTodoItemForID( end local function TodoEntry( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Item: TodoItem, Parent: UsedAs, @@ -370,7 +370,7 @@ type DragInfo = { } local function Draggable( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { ID: string, Name: UsedAs?, @@ -486,7 +486,7 @@ The `TodoEntry` component is meant to represent one individual `TodoItem`. ```Lua local function TodoEntry( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Item: TodoItem, Parent: UsedAs, diff --git a/docs/examples/cookbook/loading-spinner.md b/docs/examples/cookbook/loading-spinner.md index 94ea391da..fab6517ef 100644 --- a/docs/examples/cookbook/loading-spinner.md +++ b/docs/examples/cookbook/loading-spinner.md @@ -17,7 +17,7 @@ local SPIN_DEGREES_PER_SECOND = 180 local SPIN_SIZE = 50 local function Spinner( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Layout: { LayoutOrder: UsedAs?, @@ -80,7 +80,7 @@ The main thing to note is that it asks for a `CurrentTime` property. ```Lua hl_lines="10" local function Spinner( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Layout: { LayoutOrder: UsedAs?, diff --git a/docs/examples/cookbook/player-list.md b/docs/examples/cookbook/player-list.md index a01534876..1a13685ba 100644 --- a/docs/examples/cookbook/player-list.md +++ b/docs/examples/cookbook/player-list.md @@ -14,7 +14,7 @@ local Children = Fusion.Children type UsedAs = Fusion.UsedAs local function PlayerList( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Players: UsedAs<{Player}> } @@ -97,7 +97,7 @@ position, size, appearance and behaviour. ```Lua local function PlayerList( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Players: UsedAs<{Player}> } diff --git a/docs/tutorials/best-practices/callbacks.md b/docs/tutorials/best-practices/callbacks.md index 89f56efff..ea29a3416 100644 --- a/docs/tutorials/best-practices/callbacks.md +++ b/docs/tutorials/best-practices/callbacks.md @@ -65,7 +65,7 @@ the button is clicked, the button needs to run some external code: ```Lua hl_lines="17" local function Button( - scope: Fusion.Scope + scope: Fusion.Scope, props: { Position: UsedAs?, Size: UsedAs?, @@ -102,7 +102,7 @@ Luau won't add the key to the table if the value is `nil`. ```Lua hl_lines="7 18" local function Button( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Position: UsedAs?, Size: UsedAs?, @@ -128,7 +128,7 @@ to do your own processing first: ```Lua hl_lines="19-23" local function Button( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Position: UsedAs?, Size: UsedAs?, diff --git a/docs/tutorials/best-practices/components.md b/docs/tutorials/best-practices/components.md index 15328fdfd..53a9b063e 100644 --- a/docs/tutorials/best-practices/components.md +++ b/docs/tutorials/best-practices/components.md @@ -9,7 +9,7 @@ For example, consider this function, which generates a button based on some type UsedAs = Fusion.UsedAs local function Button( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Position: UsedAs?, AnchorPoint: UsedAs?, @@ -174,7 +174,7 @@ scope with those methods pre-defined. ```Lua hl_lines="2" local function Component( - scope: Fusion.Scope, + scope: Fusion.Scope, props: {} ) return scope:New "Thing" { @@ -189,7 +189,7 @@ Instead, create a new inner scope with the methods you need. ```Lua hl_lines="5-8" local function Component( - scope: Fusion.Scope, + scope: Fusion.Scope, props: {} ) local scope = scope:innerScope { @@ -247,7 +247,7 @@ Here's an example of how you could split up some components into modules: type UsedAs = Fusion.UsedAs local function PopUp( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Message: UsedAs, DismissText: UsedAs @@ -282,7 +282,7 @@ Here's an example of how you could split up some components into modules: type UsedAs = Fusion.UsedAs local function Message( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Text: UsedAs } @@ -307,7 +307,7 @@ Here's an example of how you could split up some components into modules: type UsedAs = Fusion.UsedAs local function Button( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { Text: UsedAs } diff --git a/docs/tutorials/best-practices/instance-handling.md b/docs/tutorials/best-practices/instance-handling.md index b43722802..e0429cba0 100644 --- a/docs/tutorials/best-practices/instance-handling.md +++ b/docs/tutorials/best-practices/instance-handling.md @@ -132,7 +132,7 @@ example, if you accept a table of `props`, you can add a `[Children]` key: ```Lua hl_lines="4 8" local function PopUp( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { [typeof(Children)]: Fusion.Children } diff --git a/docs/tutorials/best-practices/sharing-values.md b/docs/tutorials/best-practices/sharing-values.md index f77ec6143..122a65d68 100644 --- a/docs/tutorials/best-practices/sharing-values.md +++ b/docs/tutorials/best-practices/sharing-values.md @@ -57,7 +57,7 @@ codebase will be able to see and interact with those state objects. } function Theme.init( - scope: Fusion.Scope + scope: Fusion.Scope ) Theme.currentTheme = scope:Value("light") end diff --git a/docs/tutorials/best-practices/state.md b/docs/tutorials/best-practices/state.md index dfdd53ffe..435b28cab 100644 --- a/docs/tutorials/best-practices/state.md +++ b/docs/tutorials/best-practices/state.md @@ -12,7 +12,7 @@ local HOVER_COLOUR = Color3.new(0.5, 0.75, 1) local REST_COLOUR = Color3.new(0.25, 0.5, 1) local function Button( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { -- ... some properties ... } @@ -58,7 +58,7 @@ now there's two state objects where one would have sufficed ```Lua hl_lines="7" local function CheckBox( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { -- ... some properties ... } @@ -86,7 +86,7 @@ intercept the click or toggle a different state ```Lua hl_lines="4" local function CheckBox( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { IsChecked: Fusion.Value -- slightly better } @@ -111,7 +111,7 @@ check box is completely customisable ```Lua hl_lines="4-5 10" local function CheckBox( - scope: Fusion.Scope, + scope: Fusion.Scope, props: { IsChecked: UsedAs, -- best OnClick: () -> ()