dxc-technology / halstack-react

Library of components for building SPAs with React and Halstack Design System
https://developer.dxc.com/halstack/
Apache License 2.0
15 stars 14 forks source link

[`DxcContainer`] Unable to define position on `sticky` mode #1953

Closed AlanPadi95 closed 3 months ago

AlanPadi95 commented 3 months ago

Is your feature request related to a problem? Please describe. We have a problem related to the DxcContainer when is configured to be in a sticky position, and we need to define the position on the screen.

<DxcContainer
        height="fit-content"
        maxHeight="calc(100vh - 300px)"
        overflow="auto"
        position="sticky"
        style={{ top: "220px" }}
      >
//[...]
</DxcContainer>

We have partially solved the problem by passing the style prop to the component but we think that this is not the general approach.

Describe the solution you'd like A possible solution is to include new props (top, bottom, left, right) to be able to modify the position of the component.

Describe alternatives you've considered NA

Additional context NA

Add Labels CSAM, DxcContainer, props, position, sticky

github-actions[bot] commented 3 months ago

Thank you for opening an issue! 🚀

Our team will review it as soon as possible. In the meantime, please make sure that you've provided all the necessary details to help us understand and address the issue effectively.

Feel free to contribute and participate in discussions!

GomezIvann commented 3 months ago

Hello, @AlanPadi95!

Can you give me more context about your issue? I have tested your code using our props (inset and position) and it works fine:

image

Thanks!

AlanPadi95 commented 3 months ago

Hi @GomezIvann!

I have tested our implementation using the inset prop and the container is shown perfectly.

Thanks for your support! And sorry for the inconvenience.

P.D.: You can close this issue if you want.

GomezIvann commented 3 months ago

Hi, again @AlanPadi95!

Great to know that it worked.

Thanks to you! 🚀