1
0
Fork 0

🚧 Updated components

This commit is contained in:
Joost De Cock 2019-07-02 19:27:51 +02:00
parent 8e5a02d715
commit fa1c9d1401
3 changed files with 20 additions and 5 deletions

View file

@ -1,13 +1,25 @@
import React from "react";
import PropTypes from "prop-types";
import Icon from "../Icon";
const Blockquote = ({ type, children }) => {
const Blockquote = ({ type, children, style }) => {
return (
<blockquote className={type}>
<blockquote className={type} style={style}>
{children}
<Icon icon={type} className={"icon " + type} />
</blockquote>
);
};
Blockquote.propTypes = {
type: PropTypes.string.isRequired,
children: PropTypes.node,
style: PropTypes.object
};
Blockquote.defaultProps = {
type: "note",
children: null,
style: {}
};
export default Blockquote;

View file

@ -101,7 +101,7 @@ const DraftSettingSa = props => {
toggleExpanded={toggleExpanded}
expanded={expanded}
showHelp={() =>
props.raiseEventAction("showHelp", {
props.raiseEvent("showHelp", {
type: "draftSetting",
value: "sa"
})

View file

@ -5,6 +5,7 @@ import icons from "./icons";
const Icon = props => {
return (
<svg
style={props.style}
className={props.className}
xmlns="http://www.w3.org/2000/svg"
width={props.size}
@ -23,7 +24,8 @@ const Icon = props => {
Icon.propTypes = {
size: PropTypes.number,
viewBox: PropTypes.string,
icon: PropTypes.string
icon: PropTypes.string,
style: PropTypes.object
};
Icon.defaultProps = {
@ -31,7 +33,8 @@ Icon.defaultProps = {
viewBox: "0 0 24 24",
className: "",
icon: "github",
color: false
color: false,
style: {}
};
export default Icon;