14.1.0 • Published 3 months ago

@edx/frontend-component-footer v14.1.0

Weekly downloads
745
License
AGPL-3.0
Repository
github
Last release
3 months ago

######################### frontend-component-footer #########################

|Build Status| |Codecov| |npm_version| |npm_downloads| |license| |semantic-release|


Overview


A generic footer for Open edX micro-frontend applications. It includes a logo and an optional language selector dropdown.


Requirements


This component uses @edx/frontend-platform services such as i18n, analytics, configuration, and the AppContext React component, and expects that it has been loaded into a micro-frontend that has been properly initialized via @edx/frontend-platform's initialize function. Please visit the frontend template application to see an example. <https://github.com/openedx/frontend-template-application/blob/3355bb3a96232390e9056f35b06ffa8f105ed7ca/src/index.jsx>_

Environment Variables

This component requires that the following environment variable be set by the consuming micro-frontend.

  • LMS_BASE_URL - The URL of the LMS of your Open edX instance.
  • LOGO_TRADEMARK_URL - This is a URL to a logo for use in the footer. This is a different environment variable than LOGO_URL (used in frontend-component-header) to accommodate sites that would like to have additional trademark information on a logo in the footer, such as a (tm) or (r) symbol.

Installation


To install this footer into your Open edX micro-frontend, run the following command in your MFE:

npm i --save @edx/frontend-component-footer

This will make the component available to be imported into your application.


Usage


This library has the following exports:

  • (default): The footer as a React component.
  • messages: Internationalization messages suitable for use with @edx/frontend-platform/i18n <https://edx.github.io/frontend-platform/module-Internationalization.html>_
  • dist/footer.scss: A SASS file which contains style information for the component. It should be imported into the micro-frontend's own SCSS file.

component props

  • onLanguageSelected: Provides the footer with an event handler for when the user selects a language from its dropdown.
  • supportedLanguages: An array of objects representing available languages. See example below for object shape.

Examples

Component Usage Example::

import Footer, { messages } from '@edx/frontend-component-footer';

...

  • An example of minimal component and messages usage. <https://github.com/openedx/frontend-template-application/blob/3355bb3a96232390e9056f35b06ffa8f105ed7ca/src/index.jsx#L23>_
  • An example of SCSS file usage. <https://github.com/openedx/frontend-template-application/blob/3cd5485bf387b8c479baf6b02bf59e3061dc3465/src/index.scss#L9>_

Development


Install dependencies::

npm i

Start the development server::

npm start

Build a production distribution::

npm run build

.. |Build Status| image:: https://api.travis-ci.com/edx/frontend-component-footer.svg?branch=master :target: https://travis-ci.com/edx/frontend-component-footer .. |Codecov| image:: https://img.shields.io/codecov/c/github/edx/frontend-component-footer :target: @edx/frontend-component-footer .. |npm_version| image:: https://img.shields.io/npm/v/@edx/frontend-component-footer.svg :target: @edx/frontend-component-footer .. |npm_downloads| image:: https://img.shields.io/npm/dt/@edx/frontend-component-footer.svg :target: @edx/frontend-component-footer .. |license| image:: https://img.shields.io/npm/l/@edx/frontend-component-footer.svg :target: @edx/frontend-component-footer .. |semantic-release| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg :target: https://github.com/semantic-release/semantic-release

14.1.0

3 months ago

14.0.10

4 months ago

14.0.9

4 months ago

14.0.2

7 months ago

14.0.3

7 months ago

14.0.4

7 months ago

14.0.5

6 months ago

14.0.6

5 months ago

14.0.7

5 months ago

14.0.8

5 months ago

14.0.1

7 months ago

14.0.0

7 months ago

13.2.0

8 months ago

13.1.0

8 months ago

13.0.5

8 months ago

13.0.4

10 months ago

13.0.3

10 months ago

13.0.2

11 months ago

13.0.1

11 months ago

13.0.0

11 months ago

12.7.1

12 months ago

12.7.0

12 months ago

12.6.2

1 year ago

12.6.1

1 year ago

12.4.0

1 year ago

12.3.0

1 year ago

12.2.1

1 year ago

12.6.0

1 year ago

12.2.0

1 year ago

12.5.2

1 year ago

12.1.2

1 year ago

12.5.0

1 year ago

12.5.1

1 year ago

12.1.0

1 year ago

12.1.1

1 year ago

12.0.0

2 years ago

11.6.3

2 years ago

11.7.0

2 years ago

11.7.3

2 years ago

11.7.4

2 years ago

11.7.1

2 years ago

11.7.2

2 years ago

11.6.0

2 years ago

11.6.1

2 years ago

11.6.2

2 years ago

11.4.0

2 years ago

11.4.1

2 years ago

11.2.1

2 years ago

11.5.1

2 years ago

11.5.2

2 years ago

11.3.1

2 years ago

11.5.0

2 years ago

11.3.0

2 years ago

11.2.0

2 years ago

11.1.1

3 years ago

11.1.2

2 years ago

11.1.0

3 years ago

11.0.0

3 years ago

10.3.0

3 years ago

10.2.3

3 years ago

10.2.4

3 years ago

10.2.2

3 years ago

10.2.0

3 years ago

10.2.1

3 years ago

10.1.6

3 years ago

10.1.5

4 years ago

10.1.4

4 years ago

10.1.3

4 years ago

10.1.2

4 years ago

10.1.1

4 years ago

10.1.0

4 years ago

10.0.11

4 years ago

10.0.10

4 years ago

10.0.9

5 years ago

10.0.8

5 years ago

10.0.7

5 years ago

10.0.6

5 years ago

10.0.5

5 years ago

10.0.4

5 years ago

10.0.3

5 years ago

10.0.1

5 years ago

10.0.2

5 years ago

10.0.0

5 years ago

9.0.1

5 years ago

9.0.0

5 years ago

8.0.0

5 years ago

7.0.5

6 years ago

7.0.4

6 years ago

7.0.3

6 years ago

7.0.2

6 years ago

7.0.1

6 years ago

7.0.0

6 years ago

6.0.3

6 years ago

6.0.2

6 years ago

6.0.1

6 years ago

6.0.0

6 years ago

5.0.0

6 years ago

4.1.5

6 years ago

4.1.4

6 years ago

4.1.3

6 years ago

4.1.2

6 years ago

4.1.1

6 years ago

4.1.0

6 years ago

4.0.0

6 years ago

3.0.9

6 years ago

3.0.8

6 years ago

3.0.7

6 years ago

3.0.6

6 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago