11.2.0 • Published 3 months ago

@financial-times/g-components v11.2.0

Weekly downloads
124
License
-
Repository
github
Last release
3 months ago

g-components

Reusable React components for building IG pages.

Adding to a project

There are two ways you can consume g-components:

  1. The full bundle
import { Accordion } from "@financial-times/g-components";
import from "@financial-times/g-components/styles.css";

This is the new way. It's easier and about as performant as the old way.

  1. Individual components
import Accordion from "@financial-times/g-components/accordion";
import from "@financial-times/g-components/styles.css";

If you're having performance issues, please try the old way of importing individual components.

Migrating to g-components v9

g-components v9 is lighter than previous versions and has a few significant API differences:

  1. You only need to import one CSS file regardless of whether you import individual components or the whole bundle:
import from "@financial-times/g-components/styles.css";
  1. The following components have been removed:
  • data-sonification
  • feature
  • html-head
  • progress
  • sticky-header
  • sticky

Please stay on v8 if you use any of these components.

Running the Storybook

You can see what components are available in Storybook:

$ npm run storybook

Development

To test components during development:

$ npm link ../g-components

Releasing

First make sure your local is up to date with the origin and that you're on the main branch:

$ git pull
$ git checkout main

Next, run npm version [major|minor|patch] to increment the version based on the type of changes in this release. We use Semantic Versioning to increment versions:

  • Breaking (non-backwards-compatible) changes should be a major release
  • New features (that are backwards-compatible) should be minor
  • Bug fixes should be a patch
  • Alternatively, you can use npm version vX.X.X to set the version yourself.

Finally, run git push --follow-tags to push the new version to GitHub, which will trigger the CircleCI pipeline that publishes the new version on NPM.

Pre-release ("canary") versions

If you'd like to release a pre-release version (e.g. to test or gradually roll out a new feature), you can create a new version like npm version v1.0.0-canary.0. The version number should represent the ultimate release this change will land in, while the final 0 can be incremented to make subsequent prerelease builds.

NPM can also generate this automatically for you, with npm version pre[major|minor|patch] --preid canary.

Licence

This software is published by the Financial Times under the MIT licence.

Please note the MIT licence only covers the software, and does not cover any FT content or branding incorporated into the software or made available using the software. FT content is copyright © The Financial Times Limited, and FT and 'Financial Times' are trademarks of The Financial Times Limited, all rights reserved. For more information about republishing FT content, please contact our republishing department.

11.2.0

3 months ago

11.1.0

3 months ago

11.0.2

3 months ago

11.1.0-canary.1

3 months ago

11.1.0-canary.0

3 months ago

11.1.0-canary.3

3 months ago

11.0.1

3 months ago

11.0.0

4 months ago

11.0.0-canary.1

4 months ago

11.0.0-canary.0

4 months ago

10.0.0

4 months ago

9.5.3

7 months ago

9.6.4

4 months ago

9.6.3

5 months ago

9.6.2

6 months ago

9.7.0

4 months ago

9.5.2

8 months ago

4.5.0

8 months ago

9.5.1

8 months ago

9.5.0

8 months ago

9.4.2

9 months ago

9.4.1

10 months ago

9.4.1-canary.0

10 months ago

9.4.1-canary.1

10 months ago

9.5.0-canary.0

10 months ago

9.4.0

10 months ago

9.3.0

11 months ago

9.1.5

12 months ago

9.2.0

11 months ago

9.2.0-canary.1

11 months ago

9.2.0-canary.0

11 months ago

9.2.0-canary.3

11 months ago

9.2.0-canary.2

11 months ago

9.1.4

12 months ago

9.1.3

1 year ago

9.1.2

1 year ago

9.1.1

1 year ago

9.1.0

1 year ago

9.0.5

1 year ago

9.0.4

1 year ago

9.0.3

1 year ago

9.0.2

1 year ago

9.0.1

2 years ago

9.0.0

2 years ago

8.2.1

2 years ago

8.2.0

2 years ago

8.1.2

2 years ago

8.1.1

2 years ago

8.1.0

3 years ago

8.0.4

3 years ago

8.0.1

3 years ago

8.0.0

3 years ago

8.0.3

3 years ago

8.0.2

3 years ago

8.0.0-alpha-1

3 years ago

8.0.0-prealpha-4

3 years ago

8.0.0-prealpha-1

3 years ago

8.0.0-prealpha-2

3 years ago

8.0.0-prealpha-7

3 years ago

8.0.0-prealpha-8

3 years ago

8.0.0-prealpha-5

3 years ago

8.0.0-prealpha-6

3 years ago

8.0.0-prealpha-9

3 years ago

0.0.0

3 years ago

7.5.4

3 years ago

7.4.4

3 years ago

7.4.3

3 years ago

7.4.2

3 years ago

7.4.1

3 years ago

7.4.0

3 years ago

7.3.2

3 years ago

7.3.1

3 years ago

7.3.0

3 years ago

7.2.6

3 years ago

7.2.5

3 years ago

7.2.8

3 years ago

7.2.7

3 years ago

7.2.4

3 years ago

7.2.3

3 years ago

7.2.1

3 years ago

7.1.11

4 years ago

7.1.10

4 years ago

7.1.9

4 years ago

7.1.8

4 years ago

7.1.7

4 years ago

7.1.5

4 years ago

7.1.4

4 years ago

7.1.3

4 years ago

7.1.2

4 years ago

7.1.1

4 years ago

7.1.0

4 years ago

7.0.9

4 years ago

7.0.8

4 years ago

7.0.7

4 years ago

7.0.6

4 years ago

7.0.5

4 years ago

7.0.4

4 years ago

7.0.3

4 years ago

7.0.2

5 years ago

7.0.1

5 years ago

7.0.0

5 years ago

7.0.0-rc5

5 years ago

7.0.0-rc4

5 years ago

7.0.0-rc3

5 years ago

7.0.0-rc2

5 years ago

7.0.0-rc1

5 years ago

6.0.2

5 years ago

6.0.1

5 years ago

5.1.1

5 years ago

5.1.0

5 years ago

6.0.0

5 years ago

5.0.15

5 years ago

5.0.13

5 years ago

5.0.14

5 years ago

5.0.12

5 years ago

5.0.10

5 years ago

5.0.9

5 years ago

5.0.8

5 years ago

5.0.7

5 years ago

5.0.6

5 years ago

5.0.5

5 years ago

5.0.4

5 years ago

5.0.3

5 years ago

5.0.2

5 years ago

5.0.1

5 years ago

5.0.0

5 years ago

4.0.18

5 years ago

4.0.17

5 years ago

4.0.16

5 years ago

4.0.15

5 years ago

4.0.14

5 years ago

4.0.13

5 years ago

4.0.12

5 years ago

4.0.11

5 years ago

4.0.10

5 years ago

4.0.9

5 years ago

4.0.8

5 years ago

4.0.7

5 years ago

4.0.5

5 years ago

4.0.4

5 years ago

4.0.3

5 years ago

4.0.1

5 years ago

4.0.2

5 years ago

4.0.0

5 years ago

3.0.17

5 years ago

3.0.16

5 years ago

3.0.15

5 years ago

3.0.14

5 years ago

3.0.13

5 years ago

3.0.12

5 years ago

3.0.11

5 years ago

3.0.10

5 years ago

3.0.9

5 years ago

3.0.8

5 years ago

3.0.7

5 years ago

3.0.6

5 years ago

3.0.5

5 years ago

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.3.7

5 years ago

2.3.6

5 years ago

2.3.4

5 years ago

2.3.3

5 years ago

2.3.2

6 years ago

2.3.0

6 years ago

2.2.6

6 years ago

2.2.5

6 years ago

2.2.4

6 years ago

2.2.3

6 years ago

2.2.2

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.29

6 years ago

2.1.28

6 years ago

2.1.27

6 years ago

2.1.26

6 years ago

2.1.25

6 years ago

2.1.24

6 years ago

2.1.23

6 years ago

2.1.22

6 years ago

2.1.21

6 years ago

2.1.20

6 years ago

2.1.19

6 years ago

2.1.18

6 years ago

2.1.17

6 years ago

2.1.16

6 years ago

2.1.15

6 years ago

2.1.14

6 years ago

2.1.11

6 years ago

2.1.10

6 years ago

2.1.8

6 years ago

2.1.6

6 years ago

2.1.5

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.0.2

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago