|
| 1 | +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 |
| 2 | +import packageJson from '@twilio-paste/blockquote/package.json'; |
| 3 | + |
| 4 | +import {SidebarCategoryRoutes} from '../../../constants'; |
| 5 | +import ComponentPageLayout from '../../../layouts/ComponentPageLayout'; |
| 6 | +import {getFeature, getNavigationData, getComponentApi} from '../../../utils/api'; |
| 7 | + |
| 8 | +export const meta = { |
| 9 | + title: 'Blockquote - Components', |
| 10 | + package: '@twilio-paste/blockquote', |
| 11 | + description: packageJson.description, |
| 12 | + slug: '/components/blockquote/api', |
| 13 | +}; |
| 14 | + |
| 15 | +export default ComponentPageLayout; |
| 16 | + |
| 17 | +export const getStaticProps = async () => { |
| 18 | + const navigationData = await getNavigationData(); |
| 19 | + const feature = await getFeature('Blockquote'); |
| 20 | + const {componentApi, componentApiTocData} = getComponentApi('@twilio-paste/blockquote'); |
| 21 | + return { |
| 22 | + props: { |
| 23 | + data: { |
| 24 | + ...packageJson, |
| 25 | + ...feature, |
| 26 | + }, |
| 27 | + componentApi, |
| 28 | + mdxHeadings: [...mdxHeadings, ...componentApiTocData], |
| 29 | + navigationData, |
| 30 | + pageHeaderData: { |
| 31 | + categoryRoute: SidebarCategoryRoutes.COMPONENTS, |
| 32 | + githubUrl: 'https://github.com/twilio-labs/paste/tree/main/packages/paste-core/components/blockquote', |
| 33 | + storybookUrl: '/?path=/story/components-blockquote--default', |
| 34 | + }, |
| 35 | + }, |
| 36 | + }; |
| 37 | +}; |
| 38 | + |
| 39 | +## Installation |
| 40 | + |
| 41 | +```bash |
| 42 | +yarn add @twilio-paste/blockquote - or - yarn add @twilio-paste/core |
| 43 | +``` |
| 44 | + |
| 45 | +## Usage |
| 46 | + |
| 47 | +```jsx |
| 48 | +import { Blockquote, BlockquoteContent, BlockquoteCitation } from '@twilio-paste/core/blockquote'; |
| 49 | + |
| 50 | +const BlockquoteExample = () => { |
| 51 | + return ( |
| 52 | + <Blockquote url="#"> |
| 53 | + <BlockquoteContent> |
| 54 | + With AI-driven products, the design process is no longer just about aesthetics. It’s about designing for the |
| 55 | + human experience as a whole. |
| 56 | + </BlockquoteContent> |
| 57 | + <BlockquoteCitation author="Google" source="People + AI Guidebook" /> |
| 58 | + </Blockquote> |
| 59 | + ); |
| 60 | +}; |
| 61 | +``` |
| 62 | + |
| 63 | +## Props |
| 64 | + |
| 65 | +<PropsTable componentApi={props.componentApi} /> |
0 commit comments