Socket
Socket
Sign inDemoInstall

@economist/fabric-components

Package Overview
Dependencies
Maintainers
134
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@economist/fabric-components

A Component library made for consumption by Fabric team.


Version published
Weekly downloads
50
decreased by-56.52%
Maintainers
134
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 19 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc