alexkuz/react-dock

Sizing a dock to fit within a page

charue808 opened this issue · 3 comments

Hello,
I was wondering if or how you can resize the height of a dock to fit within a div container. It seems that the default is the window height.

Thanks in advance!

@charue808 I actually have the same question. One way of doing it is, with dockStyle so you can set the height of your dock something like this:

const dockStyle = { left: '40px', top: '40px', height: '88.5%', };

<Dock position='left' size = {sizeOfDock} isVisible={visible} zIndex={0} dimMode='none' dockStyle={dockStyle}>

So this works for the height and top of the dock, however I cannot get "left : 40px" to work... any ideas?

@lauritapear Oh that's a good idea on the height of the Dock. Maybe left doesn't work since it's a left position dock, did you try using "right: 40px".

@charue808 I tried "right: 40px", but still didnt work for me.