mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
Stylua formatting (#785)
Uses Stylua to format all existing Lua files, and adds a CI check in `lint` to pin this improvement. Excludes formatting dependencies, of course.
This commit is contained in:
parent
840e9bedb2
commit
0f8e1625d5
52 changed files with 595 additions and 549 deletions
|
|
@ -15,7 +15,7 @@ local Page = Roact.Component:extend("Page")
|
|||
|
||||
function Page:init()
|
||||
self:setState({
|
||||
rendered = self.props.active
|
||||
rendered = self.props.active,
|
||||
})
|
||||
|
||||
self.motor = Flipper.SingleMotor.new(self.props.active and 1 or 0)
|
||||
|
|
@ -51,20 +51,21 @@ function Page:render()
|
|||
Size = UDim2.new(1, 0, 1, 0),
|
||||
BackgroundTransparency = 1,
|
||||
}, {
|
||||
Component = e(self.props.component, Dictionary.merge(self.props, {
|
||||
transparency = transparency,
|
||||
}))
|
||||
Component = e(
|
||||
self.props.component,
|
||||
Dictionary.merge(self.props, {
|
||||
transparency = transparency,
|
||||
})
|
||||
),
|
||||
})
|
||||
end
|
||||
|
||||
function Page:didUpdate(lastProps)
|
||||
if self.props.active ~= lastProps.active then
|
||||
self.motor:setGoal(
|
||||
Flipper.Spring.new(self.props.active and 1 or 0, {
|
||||
frequency = 6,
|
||||
dampingRatio = 1,
|
||||
})
|
||||
)
|
||||
self.motor:setGoal(Flipper.Spring.new(self.props.active and 1 or 0, {
|
||||
frequency = 6,
|
||||
dampingRatio = 1,
|
||||
}))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue