0

I am having a react fragment which shows loader on user clicking button.The loader is shown until response comes.Everything works fine ,except that the fragment which has loader, should be aligned to a little right.As of now my fragment code to show loader(Using Wait from spectrum).

       <Fragment  >
        <Wait size="M" />
       Please wait....
      </Fragment>

How can I move fragment to right by some distance? I cannot use div as it disturbs the layout.I can though align Wait to center by using align property but it does not support any text on that.

user124
  • 423
  • 2
  • 7
  • 26

1 Answers1

2

Fragments are not rendered in the final HTML so they cannot be selected by CSS. Therefore, you should use something which can be aligned, e.g. a div or other HTML element, and use CSS to create your desired layout.

If using a div disturbs your layout, I'd recommend revising the CSS of the containing object, if at all possible.

bjrnt
  • 2,552
  • 3
  • 27
  • 38