Large update for all components
reorganization, linting, updating file imports, consolidation warning: there will be errors in this commit todo: update webpack, add missing styles, scss files, consolidate the rest of components within features/*
This commit is contained in:
25
app/javascript/gabsocial/components/badge/badge.js
Normal file
25
app/javascript/gabsocial/components/badge/badge.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import './badge.scss';
|
||||
|
||||
export default class Badge extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
type: PropTypes.oneOf([
|
||||
'pro',
|
||||
'donor',
|
||||
'investor',
|
||||
]).isRequired,
|
||||
};
|
||||
|
||||
render() {
|
||||
const { type } = this.props;
|
||||
|
||||
if (!type) return null;
|
||||
|
||||
return (
|
||||
<span className={`badge badge--${type}`}>
|
||||
{type.toUpperCase()}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
};
|
||||
@@ -1,25 +1 @@
|
||||
import './index.scss';
|
||||
|
||||
export default class Badge extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
type: PropTypes.oneOf([
|
||||
'pro',
|
||||
'donor',
|
||||
'investor',
|
||||
]).isRequired,
|
||||
};
|
||||
|
||||
render() {
|
||||
const { type } = this.props;
|
||||
|
||||
if (!type) return null;
|
||||
|
||||
return (
|
||||
<span className={`badge badge--${type}`}>
|
||||
{type.toUpperCase()}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
};
|
||||
export { default } from './badge';
|
||||
Reference in New Issue
Block a user