Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove playroom #153

Merged
merged 4 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ yarn-error.log*

docs/.next/
docs/out/
docs/public/playroom/
# docs/public/playroom/
docs/src/playroom/snippets

components/dist/
Expand Down
1 change: 0 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"next": "12.3.0",
"next-mdx-remote": "^3.0.6",
"nookies": "^2.5.2",
"playroom": "^0.28.1",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
15 changes: 15 additions & 0 deletions docs/public/playroom/preview/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

<!DOCTYPE html>
<html lang="en">

<head>
<meta name="description" content="Design systems for ENS built with React and styled-components" />
<meta charset="utf-8">
<title>ENS Design</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="">
</head>

<body>
</body>
</html>
10 changes: 9 additions & 1 deletion docs/src/playroom/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { Snippets as PlayroomSnippets } from 'playroom'
// import { Snippets as PlayroomSnippets } from 'playroom'
import { Optional } from 'utility-types'

interface PlayroomSnippet {
group: string
name: string
code: string
}

type PlayroomSnippets = PlayroomSnippet[]

export type Snippet = Omit<
Optional<PlayroomSnippets[number], 'group'>,
'code'
Expand Down
10 changes: 9 additions & 1 deletion docs/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { Snippets as PlayroomSnippets } from 'playroom'
// import { Snippets as PlayroomSnippets } from 'playroom'
import { Optional } from 'utility-types'

interface PlayroomSnippet {
group: string
name: string
code: string
}

type PlayroomSnippets = PlayroomSnippet[]

export type Snippet = Omit<
Optional<PlayroomSnippets[number], 'group'>,
'code'
Expand Down
23 changes: 12 additions & 11 deletions docs/src/utils/playroom.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { CreateUrlOptions, createUrl } from 'playroom'
export {}
// import { CreateUrlOptions, createUrl } from 'playroom'

export const createPlayroomLink = (options: CreateUrlOptions = {}) => {
return createUrl({
baseUrl:
process.env.NODE_ENV === 'development'
? 'http://localhost:8082'
: '/playroom',
widths: [640],
...options,
})
}
// export const createPlayroomLink = (options: CreateUrlOptions = {}) => {
// return createUrl({
// baseUrl:
// process.env.NODE_ENV === 'development'
// ? 'http://localhost:8082'
// : '/playroom',
// widths: [640],
// ...options,
// })
// }
Loading
Loading