lbry-desktop/ui/component/common/empty.jsx

25 lines
500 B
React
Raw Normal View History

// @flow
import React from 'react';
2020-12-16 19:31:07 +01:00
import classnames from 'classnames';
type Props = {
text: string,
2020-12-16 19:31:07 +01:00
padded?: boolean,
};
2020-12-16 19:31:07 +01:00
export default function Empty(props: Props) {
const { text = '', padded = false } = props;
2020-12-16 19:31:07 +01:00
return (
<div className={classnames('empty__wrap', { 'empty__wrap--padded': padded })}>
<div>
{text && (
<div className="empty__content">
<p className="empty__text">{text}</p>
</div>
)}
</div>
2020-12-16 19:31:07 +01:00
</div>
);
}