-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
125 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
local run = require("./lib/run") | ||
|
||
run("wally", { "install" }) | ||
run("rojo", { "sourcemap", "build.project.json", "-o", "sourcemap.json" }) | ||
run("wally-package-types", { "--sourcemap", "sourcemap.json", "Packages" }) | ||
do | ||
run("wally", { "install" }) | ||
run("rojo", { "sourcemap", "build.project.json", "-o", "sourcemap.json" }) | ||
run("wally-package-types", { "--sourcemap", "sourcemap.json", "Packages" }) | ||
end | ||
|
||
run("wally", { "install" }, { | ||
cwd = "code-samples", | ||
}) | ||
run("rojo", { "sourcemap", "default.project.json", "-o", "sourcemap.json" }, { | ||
cwd = "code-samples", | ||
}) | ||
run("wally-package-types", { "--sourcemap", "sourcemap.json", "Packages" }, { | ||
cwd = "code-samples", | ||
}) | ||
do | ||
run("wally", { "install" }, { | ||
cwd = "code-samples", | ||
}) | ||
run("rojo", { "sourcemap", "default.project.json", "-o", "sourcemap.json" }, { | ||
cwd = "code-samples", | ||
}) | ||
run("wally-package-types", { "--sourcemap", "sourcemap.json", "Packages" }, { | ||
cwd = "code-samples", | ||
}) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# code-samples | ||
|
||
Package of code samples for using flipbook. Includes example Storybooks and Stories for each supported framework. | ||
|
||
The code samples are for illustrating usage of flipbook on the docs site. This package can also be synced into Studio and viewed in the flipbook plugin. | ||
|
||
All code samples are analyzed to ensure correctness before being deployed. | ||
|
||
## Setup | ||
|
||
Run the following commands from the root of the repo. | ||
|
||
```sh | ||
lune run wally-install | ||
lune run build | ||
rojo serve code-samples/default.project.json | ||
``` | ||
|
||
Open Studio and sync with Rojo. Then open flipbook to preview the code samples. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
local ReplicatedStorage = game:GetService("ReplicatedStorage") | ||
|
||
local React = require(ReplicatedStorage.Packages.React) | ||
|
||
local function ReactButton(props: { | ||
text: string, | ||
isDisabled: boolean, | ||
onActivated: () -> (), | ||
}) | ||
return React.createElement("TextButton", { | ||
Text = props.text, | ||
TextSize = 16, | ||
Font = Enum.Font.BuilderSansExtraBold, | ||
TextColor3 = Color3.fromRGB(50, 50, 50), | ||
BackgroundColor3 = Color3.fromRGB(255, 255, 255), | ||
AutoButtonColor = if props.isDisabled then false else true, | ||
BorderSizePixel = 0, | ||
Size = UDim2.fromOffset(200, 40), | ||
[React.Event.Activated] = if props.isDisabled then nil else props.onActivated, | ||
}, { | ||
Overlay = if props.isDisabled | ||
then React.createElement("Frame", { | ||
Size = UDim2.fromScale(1, 1), | ||
BackgroundColor3 = Color3.fromRGB(0, 0, 0), | ||
BackgroundTransparency = 0.6, | ||
}) | ||
else nil, | ||
}) | ||
end | ||
|
||
return ReactButton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters