-
Notifications
You must be signed in to change notification settings - Fork 119
chore(example-text, blockquote): add docs #4167
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b4b055b
docs(example-text): add docs
nkrantz 8a3b364
docs(blockquote): add docs
nkrantz efe987f
chore: add blockquote
nkrantz 1afe45f
chore: finish docs
nkrantz d8bc778
feat(blockquote): add bottom margin
nkrantz 9efff11
chore: type docs and vrt map
nkrantz 18c1467
chore: pr feedback
nkrantz 10618ba
chore: remove note about vertical spacing
nkrantz 1cf4679
chore: jhanvi feedback
nkrantz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@twilio-paste/blockquote": minor | ||
"@twilio-paste/core": minor | ||
--- | ||
|
||
[Blockquote] add default bottom margin of space-70 to Blockquote, add marginBottom prop for the option to remove bottom margin when necessary. |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@twilio-paste-core/blockquote", | ||
"version": "0.0.0", | ||
"private": true, | ||
"sideEffects": false, | ||
"main": "../dist/blockquote.js", | ||
"types": "../dist/blockquote.d.ts" | ||
} |
This file contains hidden or 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
65 changes: 65 additions & 0 deletions
65
packages/paste-website/src/pages/components/blockquote/api.mdx
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import Changelog from '@twilio-paste/blockquote/CHANGELOG.md'; // I don't know why this is needed but if you remove it the page fails to render | ||
import packageJson from '@twilio-paste/blockquote/package.json'; | ||
|
||
import {SidebarCategoryRoutes} from '../../../constants'; | ||
import ComponentPageLayout from '../../../layouts/ComponentPageLayout'; | ||
import {getFeature, getNavigationData, getComponentApi} from '../../../utils/api'; | ||
|
||
export const meta = { | ||
title: 'Blockquote - Components', | ||
package: '@twilio-paste/blockquote', | ||
description: packageJson.description, | ||
slug: '/components/blockquote/api', | ||
}; | ||
|
||
export default ComponentPageLayout; | ||
|
||
export const getStaticProps = async () => { | ||
const navigationData = await getNavigationData(); | ||
const feature = await getFeature('Blockquote'); | ||
const {componentApi, componentApiTocData} = getComponentApi('@twilio-paste/blockquote'); | ||
return { | ||
props: { | ||
data: { | ||
...packageJson, | ||
...feature, | ||
}, | ||
componentApi, | ||
mdxHeadings: [...mdxHeadings, ...componentApiTocData], | ||
navigationData, | ||
pageHeaderData: { | ||
categoryRoute: SidebarCategoryRoutes.COMPONENTS, | ||
githubUrl: 'https://github.com/twilio-labs/paste/tree/main/packages/paste-core/components/blockquote', | ||
storybookUrl: '/?path=/story/components-blockquote--default', | ||
}, | ||
}, | ||
}; | ||
}; | ||
|
||
## Installation | ||
|
||
```bash | ||
yarn add @twilio-paste/blockquote - or - yarn add @twilio-paste/core | ||
``` | ||
|
||
## Usage | ||
|
||
```jsx | ||
import { Blockquote, BlockquoteContent, BlockquoteCitation } from '@twilio-paste/core/blockquote'; | ||
|
||
const BlockquoteExample = () => { | ||
return ( | ||
<Blockquote url="#"> | ||
<BlockquoteContent> | ||
With AI-driven products, the design process is no longer just about aesthetics. It’s about designing for the | ||
human experience as a whole. | ||
</BlockquoteContent> | ||
<BlockquoteCitation author="Google" source="People + AI Guidebook" /> | ||
</Blockquote> | ||
); | ||
}; | ||
``` | ||
|
||
## Props | ||
|
||
<PropsTable componentApi={props.componentApi} /> |
36 changes: 36 additions & 0 deletions
36
packages/paste-website/src/pages/components/blockquote/changelog.mdx
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import {SidebarCategoryRoutes} from '../../../constants'; | ||
import Changelog from '@twilio-paste/blockquote/CHANGELOG.md'; | ||
import packageJson from '@twilio-paste/blockquote/package.json'; | ||
import ComponentPageLayout from '../../../layouts/ComponentPageLayout'; | ||
import {getFeature, getNavigationData} from '../../../utils/api'; | ||
|
||
export const meta = { | ||
title: 'Blockquote - Components', | ||
package: '@twilio-paste/blockquote', | ||
description: packageJson.description, | ||
slug: '/components/blockquote/changelog', | ||
}; | ||
|
||
export default ComponentPageLayout; | ||
|
||
export const getStaticProps = async () => { | ||
const navigationData = await getNavigationData(); | ||
const feature = await getFeature('Blockquote'); | ||
return { | ||
props: { | ||
data: { | ||
...packageJson, | ||
...feature, | ||
}, | ||
navigationData, | ||
mdxHeadings, | ||
pageHeaderData: { | ||
categoryRoute: SidebarCategoryRoutes.COMPONENTS, | ||
githubUrl: 'https://github.com/twilio-labs/paste/tree/main/packages/paste-core/components/blockquote', | ||
storybookUrl: '/?path=/story/components-blockquote--default', | ||
}, | ||
}, | ||
}; | ||
}; | ||
|
||
<Changelog /> |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.