mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[compiler:playground] JS tab is expanded by default
When using the playground you typically want to see what it outputs, so
let's make the JS tab expanded by default.
ghstack-source-id: 721bc4c381
Pull Request resolved: https://github.com/facebook/react/pull/29203
This commit is contained in:
@@ -28,7 +28,6 @@ test("editor should compile successfully", async ({ page }) => {
|
||||
});
|
||||
|
||||
// User input from hash compiles
|
||||
await page.getByRole("button", { name: /JS/ }).click();
|
||||
await page.screenshot({
|
||||
fullPage: true,
|
||||
path: "test-results/01-show-js-before.png",
|
||||
|
||||
@@ -177,7 +177,7 @@ function getSourceMapUrl(code: string, map: string): string | null {
|
||||
}
|
||||
|
||||
function Output({ store, compilerOutput }: Props) {
|
||||
const [tabsOpen, setTabsOpen] = useState<Set<string>>(() => new Set());
|
||||
const [tabsOpen, setTabsOpen] = useState<Set<string>>(() => new Set(['JS']));
|
||||
const [tabs, setTabs] = useState<Map<string, React.ReactNode>>(
|
||||
() => new Map(),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user