All files / app/assets/javascripts/notes/components discussion_notes_replies_wrapper.vue

0% Statements 0/3
0% Branches 0/1
0% Functions 0/1
0% Lines 0/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34                                                                   
<script>
import { normalizeChildren } from '~/lib/utils/vue3compat/normalize_children';
/**
 * Wrapper for discussion notes replies section.
 *
 * This is a functional component using the render method because in some cases
 * the wrapper is not needed and we want to simply render along the children.
 */
export default {
  functional: true,
  props: {
    isDiffDiscussion: {
      type: Boolean,
      required: false,
      default: false,
    },
  },
  render(h, { props, children }) {
    Iif (props.isDiffDiscussion) {
      return h(
        'li',
        {
          class:
            'discussion-collapsible gl-border-solid gl-border-gray-100 gl-border-1 gl-rounded-base gl-border-top-0',
        },
        [h('ul', { class: 'notes' }, children)],
      );
    }
 
    return normalizeChildren(children);
  },
};
</script>