Skip to content

Commit

Permalink
feat(shs-5963): add prefered reduced motion in previews
Browse files Browse the repository at this point in the history
  • Loading branch information
Mari Nez committed Dec 2, 2024
1 parent 743a58a commit cf45884
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,14 @@ function su_humsci_gin_admin_preprocess_field(&$variables) {
$variables['#attached']['library'][] = 'humsci_basic/tablescope';
}
}

/**
* Implements hook_preprocess_HOOK().
*/
function su_humsci_gin_admin_preprocess_paragraph(&$variables) {
$paragraph = $variables['paragraph'];
// Attach library to stanford gallery
if ($paragraph->bundle() == 'stanford_gallery') {
$variables['#attached']['library'][] = 'humsci_basic/preferedreducedmotion';
}
}

0 comments on commit cf45884

Please sign in to comment.