Skip to content

Commit

Permalink
help: Created Help message component to quickly show a help article l…
Browse files Browse the repository at this point in the history
…ink when necessary for quick updates. Could help with issue #65
  • Loading branch information
christoph-codes committed Oct 9, 2021
1 parent a56a2a6 commit 5a0a43c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
17 changes: 10 additions & 7 deletions src/components/HelpMessage/HelpMessage.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import React from 'react';
import { AiOutlineQuestionCircle } from 'react-icons/ai';
import PropTypes from 'prop-types';
import './HelpMessage.scss';

const HelpMessage = ({ className, children, ...rest }) => {
return (
<div
className={`HelpMessage p-4 text-center text-gray-light bg-gray-bright mt-3 ${
className || ''
}`}
{...rest}
>
{children}
<div className="HelpMessage">
<hr />
<div
className={`HelpMessageBox text-center mt-4 ${className || ''}`}
{...rest}
>
<AiOutlineQuestionCircle size="24" />
{children}
</div>
</div>
);
};
Expand Down
21 changes: 19 additions & 2 deletions src/components/HelpMessage/HelpMessage.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
@import '../../assets/styles/colors';
.HelpMessage {
border-radius: 0.5rem;
}
hr {
margin: 1.5rem 0;
border-color: $primary-bright;
}
.HelpMessageBox {
border-radius: 0.5rem;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
svg {
fill: $primary;
}
p {
color: $gray;
}
}
}

0 comments on commit 5a0a43c

Please sign in to comment.