Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: repurpose as open edx footer #46

Merged
merged 3 commits into from
Sep 30, 2019
Merged

Conversation

abutterworth
Copy link
Contributor

@abutterworth abutterworth commented Sep 26, 2019

Simplify the prop api in preparation for making a second, Open edX footer, that is swappable. Most edX values are now baked in.


Usage

To install frontend-component-footer into your project

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

Component Usage

   import Footer from '@edx/frontend-component-footer';
   import footerMessages from '@edx/frontend-component-footer/src/i18n/index';

   ...

   <Footer
      handleAllTrackEvents={(eventName, properties) => {/* track click event */}}
      onLanguageSelected={(languageCode) => {/* set language */}}
      supportedLanguages={[
         { label: 'English', value: 'en'},
         { label: 'Español', value: 'es' },
      ]}
   />
  • handleAllTrackEvents (required)
  • onLanguageSelected (optional)
  • supportedLanguages (optional)

Requirements

This component uses @edx/frontend-i18n. Any containing app must provide @edx/frontend-i18n as a peer dependency, and be wrapped inside an IntlProvider element, whether or not your consuming application is actually localized. For a basic default locale (English) version, follow the IntlProvider example in the sample application in src/index.jsx <src/index.jsx>__.

@abutterworth abutterworth requested review from a team September 26, 2019 19:36
Adam Butterworth added 2 commits September 26, 2019 18:11
BREAKING CHANGE: The footer is now  transpiled from es6 preserving modules. To use this package in a project it must now be transpiled by the requiring project via webpack or other configuration
BREAKING CHANGE: This footer now serves as the Open edX footer. For the edX footer see edx/frontend-component-footer-edx on github
@abutterworth abutterworth changed the title feat: simplify prop api and bake in many values feat: repurpose as open edx footer Sep 27, 2019
Copy link

@matthugs matthugs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a look-see and think we could use more eyes than just mine, but this looks good

@davidjoy davidjoy merged commit 83bad3d into master Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants