🚧 Updated components
This commit is contained in:
parent
8e5a02d715
commit
fa1c9d1401
3 changed files with 20 additions and 5 deletions
|
@ -1,13 +1,25 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
import Icon from "../Icon";
|
import Icon from "../Icon";
|
||||||
|
|
||||||
const Blockquote = ({ type, children }) => {
|
const Blockquote = ({ type, children, style }) => {
|
||||||
return (
|
return (
|
||||||
<blockquote className={type}>
|
<blockquote className={type} style={style}>
|
||||||
{children}
|
{children}
|
||||||
<Icon icon={type} className={"icon " + type} />
|
<Icon icon={type} className={"icon " + type} />
|
||||||
</blockquote>
|
</blockquote>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Blockquote.propTypes = {
|
||||||
|
type: PropTypes.string.isRequired,
|
||||||
|
children: PropTypes.node,
|
||||||
|
style: PropTypes.object
|
||||||
|
};
|
||||||
|
|
||||||
|
Blockquote.defaultProps = {
|
||||||
|
type: "note",
|
||||||
|
children: null,
|
||||||
|
style: {}
|
||||||
|
};
|
||||||
export default Blockquote;
|
export default Blockquote;
|
||||||
|
|
|
@ -101,7 +101,7 @@ const DraftSettingSa = props => {
|
||||||
toggleExpanded={toggleExpanded}
|
toggleExpanded={toggleExpanded}
|
||||||
expanded={expanded}
|
expanded={expanded}
|
||||||
showHelp={() =>
|
showHelp={() =>
|
||||||
props.raiseEventAction("showHelp", {
|
props.raiseEvent("showHelp", {
|
||||||
type: "draftSetting",
|
type: "draftSetting",
|
||||||
value: "sa"
|
value: "sa"
|
||||||
})
|
})
|
||||||
|
|
|
@ -5,6 +5,7 @@ import icons from "./icons";
|
||||||
const Icon = props => {
|
const Icon = props => {
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
|
style={props.style}
|
||||||
className={props.className}
|
className={props.className}
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
width={props.size}
|
width={props.size}
|
||||||
|
@ -23,7 +24,8 @@ const Icon = props => {
|
||||||
Icon.propTypes = {
|
Icon.propTypes = {
|
||||||
size: PropTypes.number,
|
size: PropTypes.number,
|
||||||
viewBox: PropTypes.string,
|
viewBox: PropTypes.string,
|
||||||
icon: PropTypes.string
|
icon: PropTypes.string,
|
||||||
|
style: PropTypes.object
|
||||||
};
|
};
|
||||||
|
|
||||||
Icon.defaultProps = {
|
Icon.defaultProps = {
|
||||||
|
@ -31,7 +33,8 @@ Icon.defaultProps = {
|
||||||
viewBox: "0 0 24 24",
|
viewBox: "0 0 24 24",
|
||||||
className: "",
|
className: "",
|
||||||
icon: "github",
|
icon: "github",
|
||||||
color: false
|
color: false,
|
||||||
|
style: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Icon;
|
export default Icon;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue