0.0.1 • Published 1 year ago

@yattho/component-metadata v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Yattho Component Metadata

npm CI

Inspired by Primer component-metadata package

A place to store component metadata shared across all implementations of Yattho.

Installation

Install with npm or yarn:

npm install @yattho/component-metadata
yarn add @yattho/component-metadata

Usage

import metadata from "@yattho/component-metadata";

metadata.components.progress_bar;
// {
//   id: 'progress_bar',
//   displayName: 'Progress bar',
//   description: 'Use progress bars to visualize task completion.',
//   implementations: {
//     react: 'https://yattho.com/components/ProgressBar',
//     viewComponent: 'https://yattho.com/view-components/components/progressbar',
//     css: 'https://yattho.com/css/components/progress'
//   }
// }

Metadata

Each component should have the following metadata:

NameDescriptionGuidelines
id (required)A unqiue string used to identify the componentThe id of the component should be the component name in snake case (e.g. "progress_bar")
displayName (required)The name of the componentUse sentence case (e.g. "Progress bar")
description (required)Describe how the component should be usedUse active voice (e.g. "Use progress bars to ..." not "Progress bars are used to ...")
guidelinesURL to design guidelines for the component
implementations.reactURL to React implementation of the component
implementations.viewComponentURL to ViewComponent implementation of the component
implementations.cssURL to CSS impelementation of the component
implementations.figmaURL to Figma implementation of the component
0.0.1

1 year ago