Comments (5)
To facilitate user feedbacks and make a really good roadmap, now we're using Canny as a tool to create our roadmap 😍
We think that is better keep Github issues only for bugs and other issues! 🐞
This issue is already on our roadmap, so I'll close this issue in favor of it!
👉🏻 Check this issue on roadmap
from docz.
🎉 Fixed and released in the new v0.4.0
from docz.
Yeah, this is better I think too. I tried to do this, but unfortunately did not work very well, so how I needed to release soon I ended up leaving for later! But I have plans to fix this, thanks @mrmartineau 🙏
from docz.
Maybe remove <Playground>
and </Playground>
in here https://github.com/pedronauck/docz/blob/master/packages/docz-core/src/utils/plugin-hast.ts#L24 🤔 Maybe there's a cleaner way?
from docz.
This would also be nice when you need to prepare your props data in the documentation. For instance:
UserProfile.mdx:
import Username from './Username'
import { makeAvatarFromImage } from './utils'
import { userStub, imageStub } from './stubs'
## Usage
<Playground render={() => {
const username = `@${userStub.username}`
const avatar = makeAvatarFromImage(imageStub)
// ... more lines of code that don't need to be displayed in the docs...
return <UserProfile username={username} avatar={avatar} />
}} />
Output:
<UserProfile username={username} avatar={avatar} />
A related but different question: Is it possible to use javascript in MDX and make it available to the playground component?
For example:
import Username from './Username'
import { makeAvatarFromImage } from './utils'
import { userStub, imageStub } from './stubs'
const username = `@${userStub.username}`
const avatar = makeAvatarFromImage(imageStub)
// ... more lines of code that don't need to be displayed in the docs...
## Usage
<Playground>
<UserProfile username={username} avatar={avatar} />
</Playground>
When I try something like this, i get username is not defined
from docz.
Related Issues (20)
- gh repo clone github/docs HOT 1
- Port not used from custom gatsby-config.js file
- Can't resolve '@emotion/core' HOT 9
- Error on first install. nError handler for invocation 'building-schema', error was 'TypeError: (0 , _buildASTSchema.getDescription) HOT 2
- Test out possibly breaking changes on security updates made from dependabot pull-requests HOT 3
- pnpm bare installs broken HOT 2
- What font is used in Docz image? HOT 3
- Error in setting up development environment HOT 4
- Release notes for 2.4.0 are missing HOT 1
- Multiple errors after installing docz HOT 11
- Error while initializing babel in docz HOT 3
- Can't resolve '@babel/runtime/helpers/esm/regeneratorRuntime'
- Error: Cannot find module 'typescript' docz HOT 2
- Add a visible notice on the documentation on why docz will not work
- Can we say that the project is Dead now? What are the alternatives? HOT 1
- how to use in react 18 HOT 4
- Error docz build
- When I try to run the project in the development environment, I get the following error: HOT 1
- An error occurred while accessing the file after local packaging.
- Would it be possible in a react native project with Typescript to read the tsx components inside node_modules ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docz.