Skip to content

Commit 50e763d

Browse files
authored
Docs: new setup for shared component content
2 parents 9363754 + 7a75a67 commit 50e763d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+265
-230
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'Abbreviation',
5+
description:
6+
'A text that represents an abbreviation or acronym. Abbreviation has an inline layout. Surfaces may apply styling to this component.',
7+
category: 'Polaris web components',
8+
subCategory: 'Titles and text',
9+
};
10+
11+
export default data;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'Banner',
5+
description:
6+
'Use `s-banner` to communicate important status updates or indicate that there are important actions that users must take. \n\n You can use banners both as a standalone component on a page or inside of a `s-section`.',
7+
category: 'Polaris web components',
8+
subCategory: 'Feedback',
9+
};
10+
11+
export default data;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'Box',
5+
description:
6+
'The `s-box` component is an escape hatch for building custom user interfaces. You should only use `s-box` when you cannot build what you need with the existing components.',
7+
category: 'Polaris web components',
8+
subCategory: 'Structure',
9+
};
10+
11+
export default data;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'Button',
5+
description:
6+
'Use `s-button` when you want to provide users the ability to perform specific actions, submitting forms, or opening dialogs.',
7+
category: 'Polaris web components',
8+
subCategory: 'Actions',
9+
};
10+
11+
export default data;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import type {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'ClipboardItem',
5+
description: `
6+
This component is used alongside a \`Button\` or \`Link\` component to facilitate writing to the user's clipboard.
7+
8+
ClipboardItem's \`--auto\` command is \`--copy\`, which copies the content of the text prop to the clipboard.
9+
10+
\`ClipboardItem\` is a non-rendering component.
11+
`,
12+
category: 'Polaris web components',
13+
subCategory: 'utilities',
14+
};
15+
16+
export default data;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'DropZone',
5+
description: `DropZone allows file uploads through drag-and-drop functionality into a designated area on a page, or by activating a button. At present, DropZone does not offer image upload preview capabilities. The use of object URLs directly in an image component is not possible due to the extension and host operating on separate domains.
6+
\n Any element focused within the Dropzone component, including child elements such as the 'Add file' button, will initiate the file selector when the Enter or Spacebar key is pressed.
7+
`,
8+
category: 'Polaris web components',
9+
subCategory: 'Forms',
10+
};
11+
12+
export default data;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'Form',
5+
description:
6+
'The form component should be used to wrap one or more form controls. This component provides an "implicit submit" behavior, where customers can submit the form from any input by pressing "Enter" on their keyboards. This behavior is widely expected, and should be respected as often as possible.\n\nUnlike an HTML `form` element, this component does not support configuring the descendant fields to be submitted via HTTP automatically. Instead, you must provide an `onSubmit` callback that will perform the necessary HTTP requests in JavaScript.',
7+
category: 'Polaris web components',
8+
subCategory: 'Forms',
9+
};
10+
11+
export default data;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'Heading',
5+
description:
6+
'The `s-heading` component renders hierarchical titles similar to HTML’s `h1-h6` elements. Heading levels are automatically determined by parent `s-section` nesting depth starting from h2. Always prefer using the `heading` property on `s-section` and `s-banner` components before constructing custom layout with `s-heading`.',
7+
category: 'Polaris web components',
8+
subCategory: 'Titles and text',
9+
};
10+
11+
export default data;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'Image',
5+
description:
6+
'Use `s-image` when you want to display an image. \n\n When using images or illustrations in your app, ensure that they add clarity and clearly direct users to the next step. Make sure to use high-resolution images to ensure a professional, high-quality experience.',
7+
category: 'Polaris web components',
8+
subCategory: 'Media',
9+
};
10+
11+
export default data;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type {SharedReferenceEntityTemplateSchema} from '../docs-type';
2+
3+
const data: SharedReferenceEntityTemplateSchema = {
4+
name: 'Link',
5+
description:
6+
'`s-link` is an interactive component that directs users to a specified URL. It even supports custom protocols.',
7+
category: 'Polaris web components',
8+
subCategory: 'Actions',
9+
};
10+
11+
export default data;

0 commit comments

Comments
 (0)