react-dock icon indicating copy to clipboard operation
react-dock copied to clipboard

Sizing a dock to fit within a page

Open charue808 opened this issue 7 years ago • 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 avatar Aug 20 '18 00:08 charue808

@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 avatar Aug 31 '18 03:08 lauritapear

@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 avatar Sep 01 '18 00:09 charue808

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

lauritapear avatar Sep 09 '18 11:09 lauritapear