Skip to content

Commit

Permalink
Docs poc with embedded stackblitz editor and component preview. Code …
Browse files Browse the repository at this point in the history
…fragment has copy clip.
  • Loading branch information
flavioespinoza committed Nov 1, 2024
1 parent 87c4b55 commit 5749328
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
branches: ['main']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -18,7 +18,7 @@ permissions:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
group: 'pages'
cancel-in-progress: false

jobs:
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"dependencies": {
"@gem-mine/docsify-react-live": "^1.7.1",
"@stackblitz/sdk": "^1.11.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lucide-react": "^0.454.0",
Expand Down
2 changes: 1 addition & 1 deletion src/docs/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Bless UI Docs
# Bless UI Docs
17 changes: 17 additions & 0 deletions src/docs/components/examples/input.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Input } from '@/components/ui'

const DemoInput = () => {
return (
/// [demo_input]
<Input placeholder="Email" type="email" />
/// [demo_input]
)
}

export function Demo() {
return (
<div className="flex w-[600px] h-[200px] p-4 my-4">
<DemoInput />
</div>
)
}
11 changes: 10 additions & 1 deletion src/docs/components/input.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Input

<!-- [input.tsx](examples/input.tsx ':include :type=code :fragment=demo_input') -->

```tsx
<TextField id="outlined-basic" label="Outlined" variant="outlined" />
<TextField id="filled-basic" label="Filled" variant="filled" />
<TextField id="standard-basic" label="Standard" variant="standard" />
```

<iframe src="https://stackblitz.com/edit/react-ctfd93?embed=1&file=Demo.tsx&hideExplorer=1&hideNavigation=1&view=editor" style="width:100%; height: 400px; border:0; border-radius: 4px; overflow:hidden;"></iframe>

<iframe src="https://react-ctfd93.stackblitz.io" style="width:100%; height: 400px; border:0; border-radius: 4px; overflow:hidden;"></iframe>

<iframe src="https://stackblitz.com/edit/react-starter-eval-dwegeb?embed=1&file=src%2FApp.js" style="width:100%; height: 400px; border:0; border-radius: 4px; overflow:hidden;"></iframe>
6 changes: 6 additions & 0 deletions src/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@
noData: 'No Results!',
depth: 6,
hideOtherSidebarContent: false // whether or not to hide other sidebar content
},
copyCode: {
buttonText: 'Copy',
errorText: 'Error',
successText: 'Copied'
}
}
</script>
<!-- Docsify v4 -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="//cdn.jsdelivr.net/npm/[email protected]/components/prism-jsx.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/[email protected]/components/prism-typescript.min.js"></script>
<script src="https://unpkg.com/docsify-copy-code@2"></script>
</body>
</html>
13 changes: 0 additions & 13 deletions src/examples/input.tsx

This file was deleted.

0 comments on commit 5749328

Please sign in to comment.