Created
September 26, 2018 00:05
-
-
Save illepic/71b5bd870bae9b06f9e8aa72444baa73 to your computer and use it in GitHub Desktop.
Particle Drupal.t() integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// apps/drupal/index.js | |
import { carousel } from '../../source/design-system'; | |
Drupal.behaviors.carouselIntegration = { | |
attach($context) { | |
carousel.enable($context, { | |
strings: { | |
goBackText: Drupal.t('Go back'), | |
goForwardText: Drupal.t('Go forward'), | |
}, | |
}); | |
}, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/_patterns/02-molecules/carousel/index.js | |
export function enable($context, settings) { | |
// ... | |
carouselPlugin.goBackText = settings.strings.goBackText; | |
carouselPlugin.goForwardText = settings.strings.goForwardText; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment