function getModifier(Scope: Scope): (props: ModifierInput) -> Computed<any>
Initializes the utility component and returns a new function to create a modifier state from that component, which is used to keep track of the changes that may occur in the props table's values. This is used to get a StudioStyleGuideModifier that changes depending on the given values within the props table.
Default Syntax
local getModifierUtility = require(StudioComponents.Util.getModifier)
local getModifier = getModifierUtility(Scope)
Shorthand
local getModifier = require(StudioComponents.Util.getModifier)(Scope)
Parameters
| Scope: Scope |
The Scope the utility function will be initialized in. |
Returns Function
Parameters
| props: ModifierInput |
The table which contains the properties of the component that will be created. |
Returns