packages/dev/docs/src/template.mdx
{/* Copyright 2020 Adobe. All rights reserved. This file is licensed to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */}
import {Layout} from '@react-spectrum/docs'; export default Layout;
import docs from 'docs:@react-spectrum/COMPONENT_NAME'; import {HeaderInfo, PropTable, PageDescription} from '@react-spectrum/docs'; import packageData from '@react-spectrum/COMPONENT_NAME/package.json';
import {Component} from '@react-spectrum/COMPONENT_NAME';
<PageDescription>{docs.exports.Component.description}</PageDescription>
<HeaderInfo packageData={packageData} componentNames={['Component']} sourceData={[ {type: 'Spectrum', url: 'https://spectrum.adobe.com/page/button/'} ]} />
<Button variant="accent">Button</Button>
If the component has a children prop that accepts any type of content (e.g. ReactNode), include this section. Please include a note about how to internationalize the content.
If the component displays or allows a user to input a value, include this section.
If the component supports a label prop, include this section. Please include a note about how to internationalize the content.
If the component supports event props, include this section. Only cover the events that are important to the main functionality of the component.
If the component supports validation props, include this section.
Show examples of all variants and visual props here with links to the design website for more usage details. Examples can be grouped together for conciseness.