react95-io / React95

🌈🕹 Windows 95 style UI component library for React
https://react95.io
MIT License
6.7k stars 187 forks source link

Vertical divider would be nice #17

Closed benwiley4000 closed 5 years ago

benwiley4000 commented 5 years ago

As seen here:

Screenshot from 2019-04-21 16-59-18

I implemented something based on the existing divider component here:

const React = require('react');
const propTypes = require('prop-types');
const { themes } = require('react95');

const style = {
  width: 0,
  borderRight: `2px solid ${themes.default.borderLightest}`,
  borderLeft: `2px solid ${themes.default.borderDark}`,
  margin: 0,
  alignSelf: 'stretch',
  marginTop: -4,
  marginBottom: -4
};

const VerticalDivider = () => {
  return <div style={style} />;
};

module.exports = VerticalDivider;

The negative top/bottom margins are to account for the padding in the Toolbar component.

This is what it looks like:

Screenshot from 2019-04-21 17-31-12

arturbien commented 5 years ago

@benwiley4000 yes that would be great! can you make a pull request for that? if yes- please implement the VerticalDivider using styled-components instead of inline styles. You should be shown in the contributors list 🎉

benwiley4000 commented 5 years ago

Hey @arturbien sorry for not getting back on this.. but I appreciate you implementing this feature thank you!

arturbien commented 5 years ago

@benwiley4000 no problem! I will try to add some more things before I release new version with updated <Divider />so be patient

benwiley4000 commented 5 years ago

Thanks, let me know when you do release! I fixed my version of react95 for now because the 2px windowcontent width change will actually be a breaking change for me, since I already patched it locally.. haha.