0.8.2 • Published 2 years ago

@economist/fabric-components v0.8.2

Weekly downloads
345
License
-
Repository
github
Last release
2 years ago

npm.io

Fabric Components

These are a set of Components for exclusive usage by The Economist Group. For documentation and migration guides visit here. A few bigger set of components are served via their own npm packages, you can find the fabric-carousel at https://github.com/EconomistDigitalSolutions/fabric-carousel

Table of Contents

How to Install

  • In your console run the following npm command.
    npm install @economist/fabric-components

Usage

A sample implementation would be:

import React from "react";
import HeadEcon from "@economist/fabric-components/header/headecon/HeadEcon";

const App = () => {
    return (
        <div>
            <HeadEcon />
        </div>
    );
};

export default App;

Contributing

Using the script

We have a handy script set up that you can use to create components. It can be invoked directly from the scripts folder or via npm

npm run new

The bash script will ask for category; if a category does not exist, it will create it for you. After you have a provided a category, bash will ask you to name the component, it will capitalise the first letter for you, see naming conventions below for more information. Once you provide it with component name, you will get three files, namely, "Component.jsx", "component.test.js", "component.md".

All new components should have prop-types, and atleast one test written. If a component has a lot of functionalities, make sure that they are tested as well. Finally, feel free to illustrate the usage of component and add in relevant information in the markdown file.

Manually creating components.

Feel free to create your components manually, though make sure to follow our naming conventions and directory conventions which are as follows :

Directory Conventions

  1. Place your component in appropriate category. Certain overly complex components such as the masthead etc. can get their own categories.
  2. Inside the category, create a directory with the component's name in lowercase.

Naming Conventions

  1. Make sure that the "component.jsx" is named exactly the same as what is being export from the javascript inside.
  2. Lowercase the markdown files so as to not conflict imports during tests.
  3. Tests are to be kept lowercase as well.

Once you have created your component, do make sure to add it to the relevant categories index.js as an export.


Issues

For Component suggestions, please look into Suggestions.

  1. Provide a complete yet concise title to issue.
  2. Try to list as much information as you can about the issue.
    1. Steps to reproduce the issue (wherever relevant)
    2. Current Configuration / Specs (in case of performance related issue)
    3. Please assign a label to the issue.
    4. If you can find any similar issues, if they cover everythign your issue does, please refrain from creating a new one, if not, make sure you link to that issue as well.

Suggestions

Follow the below mentioned guidelines for filing component suggestions.

  1. List the scope of suggestion.
  2. List how the suggested component can be of value and have a general application.
  3. List if you are willing to contribute and code the suggested component.
  4. If available, illustrate with an example.

Support

For further support in using, and any questions should be addressed to Aaditya Sahay

0.8.2

2 years ago

0.6.9

2 years ago

0.3.10

2 years ago

0.6.10

2 years ago

0.6.11

2 years ago

0.8.1

2 years ago

0.8.0

2 years ago

0.7.5

2 years ago

0.7.4

2 years ago

0.7.3

3 years ago

0.7.2

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.7

3 years ago

0.6.6

3 years ago

0.6.5

3 years ago

0.6.4

3 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.5.0-beta.1

4 years ago

0.4.5

4 years ago

0.5.0-beta.0

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.9

4 years ago

0.3.8

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.2

4 years ago