mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-19 20:59:29 +00:00
[WIP] Initial status work
This commit is contained in:
49
app/javascript/glitch/components/common/separator/index.js
Normal file
49
app/javascript/glitch/components/common/separator/index.js
Normal file
@@ -0,0 +1,49 @@
|
||||
// <CommonSeparator>
|
||||
// ========
|
||||
|
||||
// For code documentation, please see:
|
||||
// https://glitch-soc.github.io/docs/javascript/glitch/common/separator
|
||||
|
||||
// For more information, please contact:
|
||||
// @kibi@glitch.social
|
||||
|
||||
// * * * * * * * //
|
||||
|
||||
// Imports
|
||||
// -------
|
||||
|
||||
// Package imports.
|
||||
import classNames from 'classnames';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
|
||||
// Stylesheet imports.
|
||||
import './style';
|
||||
|
||||
// * * * * * * * //
|
||||
|
||||
// The component
|
||||
// -------------
|
||||
|
||||
const CommonSeparator = ({
|
||||
className,
|
||||
visible,
|
||||
...others
|
||||
}) => visible ? (
|
||||
<span
|
||||
className={
|
||||
classNames('glitch', 'glitch__common__separator', className)
|
||||
}
|
||||
{...others}
|
||||
role='separator'
|
||||
/> // Contents provided via CSS.
|
||||
) : null;
|
||||
|
||||
// Props.
|
||||
CommonSeparator.propTypes = {
|
||||
className: PropTypes.string,
|
||||
visible: PropTypes.bool,
|
||||
};
|
||||
|
||||
// Export.
|
||||
export default CommonSeparator;
|
||||
Reference in New Issue
Block a user