4.0.0 • Published 1 month ago

@pagopa/pagopa-editorial-components v4.0.0

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
1 month ago

semantic-release: angular

pagoPA Editorial Components

A react component library to be used to compose pagoPa product pages based on MUI italia

Installation

To add this package to your package.json run in your terminal:

// with npm
$ npm install @pagopa/pagopa-editorial-components
// with yarn
$ yarn add @pagopa/pagopa-editorial-components

Usage

import { Hero } from "@pagopa/pagopa-editorial-components";
  ....
  <Hero ... />
  ....

Storybook

A storybook is available at this address.

CLI Commands

Here's an explanation of the commands you can find in the package.json:

  • build: It compiles the entire library project using the relative tsconfig.json file. We use it to release new versions
  • storybook: It launches a local Storybook application using 6006 port. We use it when new developments are required
  • build-storybook: It outputs a static Storybook in the storybook-static folder. We use it to deploy and upadate the online storybook
  • test: It runs unit tests for the library components

How to Contribute

Any critiques and suggestions are welcome. All components in this package should be generic enough to be used in different applications and use cases. In this sense, if you have any doubts or aren't sure, please ask your fellow designer. With that said, you basically have two options starting from the design project:

Build the generic component (easy abstraction)

  1. Take the time to make a proper analysis of the component's possible props.
  2. Ask your fellow developers/designers for comments or criticism
  3. Build it, according to the provided guidelines (see below)
  4. Test all its possible combinations, using Storybook or similar playground

Provide a sample of how to compose the component (hard abstraction)

  1. Compose the component using the available components provided by the library
  2. Add a specific story to the Storybook, under the Composition section

Either way, you must follow these guidelines:

  • Visual consistency
  • If possible, avoid magic numbers.
  • Use the provided visual attributes (color, spacing, etc…), using the corresponding theme file
  • If you have to use some values not provided by the theme object:
    • Ask your fellow designer for clarification
    • If necessary, extend it.
  • The components must be responsive by default

Accessibility

  • Ensure that the new components are accessible to all users. To avoid reinventing the wheel, take advantage of the MUI base components.
  • Try to perform the actions using only the keyboard.

If you feel pretty confident, you can open a Pull Request

3.1.3

1 month ago

3.2.0

1 month ago

3.1.4

1 month ago

4.0.0

1 month ago

3.1.2

2 months ago

3.1.1

2 months ago

3.1.0

2 months ago

3.0.0

2 months ago

2.3.3

2 months ago

2.3.2

3 months ago

2.3.1

3 months ago

2.3.0

3 months ago

2.2.0

3 months ago

2.1.4

3 months ago

2.1.3

10 months ago

1.0.0

12 months ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.14

12 months ago

0.0.15

12 months ago

0.0.16

12 months ago

2.1.0

11 months ago

2.0.0

11 months ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago