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
@chakra-ui/vue
components documentation
#69
Merged
Merged
Conversation
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
codebender828
changed the title
[WIP]: Mar 21, 2020
@chakra-ui/vue
components documentation@chakra-ui/vue
components documentation
codebender828
requested review from
DominusKelvin,
koca,
segunadebayo and
tioluwani94
March 21, 2020 19:34
Looks all good. |
Docs/getting started
DominusKelvin
approved these changes
Mar 24, 2020
fix: made sure pages always starts from top when navigating
codebender828
added
status: work in progress 🐜
Someone is working on this
type: documentation 📚
Improvements or additions to documentation
labels
Mar 25, 2020
Added docs for Button component
docs: documentation for Alert component
Okay, I got that. I would update as per the guidelines. |
docs: documentation for the Text component
docs(select.mdx): documentation for the Select component
docs(slider.mdx): documentation of the Slider component
docs(textarea.mdx): documentation of the Textarea component
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/chakra-ui/chakra-ui-vue/kgvnhr01m |
Docs/toast
codebender828
changed the title
[WIP]:
May 5, 2020
@chakra-ui/vue
components documentation@chakra-ui/vue
components documentation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@chakra-ui/vue
components documentationDeploy Preview -> https://chakra-ui-vue.now.sh
GUIDELINES
I thought to include this guideline for how to write the component docs.
Props &. Events
You might be referencing the docs for React while writing these. But we must be extremely cautious that we write them knowing that the end user is going to be a Vue.js user. And Vue has fairly different patterns. In React, the entire component API is handled via props. But in Vue we have both props and events.
When browsing the docs in Chakra-ui you will find a few components with a prop called
onChange
oronSubmit
. These should be changed to@change
and@submit
events in the Vue docs to avoid confusion. These types of props doesn't exist on the @chakra-ui/vue components except 1 or 2 of them.So this means you need to create two kinds of tables. One for Props, and another for Events.
The Props table will document the usual props. The Events table will document the events emitted by a component.
In summary:
Live code samples.
Again, to make the consumption of these components as consumer friendly as possible, we need to provide the code examples is a pattern that is familiar with all Vue developers. Every Vue dev is familiar with the concept of Vue Single File Components. It's made up of the template and script as well.
Static template examples
For simple examples that do not require any data from the script we can just directly render the components. See the badge example taken from here:
Dynamic template state
Examples that require reactive state from the
<template>
should be accompanied with the<script />
. So all such exmaples should adopt the structure of:In summary:
STATUTORIES
COMPONENTS