Permalink
Browse files

feat(Separator): Added Separator component

  • Loading branch information...
HHogg committed Aug 12, 2018
1 parent e18dd86 commit bdb157fceff688e1e972cc1c33675c2f9fa09b99
Showing with 40 additions and 0 deletions.
  1. +5 −0 src/Separator/Separator.css
  2. +34 −0 src/Separator/Separator.js
  3. +1 −0 src/index.js
@@ -0,0 +1,5 @@
.Separator {
border-right: 0;
border-bottom: 0;
border-left: 0;
}
@@ -0,0 +1,34 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Base from '../Base/Base';
import './Separator.css';

export default class Separator extends Component {
static propTypes = {
/**
* Border colour to be applied, shades are taken from the current
* theme. A value of true will reapply the current colour value.
*/
borderColor: PropTypes.oneOf([
true,
'shade-1',
'shade-2',
'shade-3',
]),
/** Thickness of the border to be applied */
borderSize: PropTypes.oneOf(['x1', 'x2']),
};

static defualtProps = {
borderColor: true,
borderSize: 'x1',
};

render() {
return (
<Base { ...this.props }
Component="div"
className="Separator" />
);
}
}
@@ -36,6 +36,7 @@ export { default as Menu } from './Menu/Menu';
export { default as MenuItem } from './Menu/MenuItem';
export { default as RadioButton } from './RadioButton/RadioButton';
export { default as Responsive } from './Responsive/Responsive';
export { default as Separator } from './Separator/Separator';
export { default as SwitchTransition } from './SwitchTransition/SwitchTransition';
export { default as Tab } from './Tab/Tab';
export { default as Tabs } from './Tab/Tabs';

0 comments on commit bdb157f

Please sign in to comment.