Implements hook_theme_suggestions_HOOK().
function paragraphs_theme_suggestions_paragraph(array $variables) {
$suggestions = array();
$paragraph = $variables['elements']['#paragraph'];
$sanitized_view_mode = strtr($variables['elements']['#view_mode'], '.', '_');
$suggestions[] = 'paragraph__' . $sanitized_view_mode;
$suggestions[] = 'paragraph__' . $paragraph
->bundle();
$suggestions[] = 'paragraph__' . $paragraph
->bundle() . '__' . $sanitized_view_mode;
return $suggestions;
}