Skip to content

Commit 9ab090b

Browse files
committed
Adding style override capabilities
1 parent 010cfbb commit 9ab090b

File tree

14 files changed

+17
-16
lines changed

14 files changed

+17
-16
lines changed

src/block-quote.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Radium from "radium";
66
class BlockQuote extends Base {
77
render() {
88
return (
9-
<blockquote style={[this.context.styles.components.blockquote, this.getStyles()]}>
9+
<blockquote style={[this.context.styles.components.blockquote, this.getStyles(), this.props.style]}>
1010
{this.props.children}
1111
</blockquote>
1212
);

src/code-pane.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CodePane extends Base {
1313
}
1414
render() {
1515
return (
16-
<pre style={[this.context.styles.components.codePane.pre, this.getStyles()]}>
16+
<pre style={[this.context.styles.components.codePane.pre, this.getStyles(), this.props.style]}>
1717
<code
1818
className="hljs"
1919
style={this.context.styles.components.codePane.code}

src/code.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Radium from "radium";
66
class Code extends Base {
77
render() {
88
return (
9-
<code style={[this.context.styles.components.code, this.getStyles()]}>
9+
<code style={[this.context.styles.components.code, this.getStyles(), this.props.style]}>
1010
{this.props.children}
1111
</code>
1212
);

src/fill.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Fill extends React.Component {
88
flex: 1
99
};
1010
return (
11-
<div style={[styles]}>
11+
<div style={[styles, this.props.style]}>
1212
{this.props.children}
1313
</div>
1414
);

src/fit.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Fit extends React.Component {
88
flex: 0
99
};
1010
return (
11-
<div style={[styles]}>
11+
<div style={[styles, this.props.style]}>
1212
{this.props.children}
1313
</div>
1414
);

src/heading.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Heading extends Base {
6060
? <div
6161
style={[
6262
this.context.styles.components.heading["h" + this.props.size],
63-
this.getStyles()]}>
63+
this.getStyles(), this.props.style]}>
6464
<svg {...this.props}
6565
viewBox={viewBox}
6666
style={styles.svg}>
@@ -74,7 +74,7 @@ class Heading extends Base {
7474
</svg>
7575
</div>
7676
: React.createElement(Tag, {
77-
style: [this.context.styles.components.heading["h" + this.props.size], this.getStyles()]
77+
style: [this.context.styles.components.heading["h" + this.props.size], this.getStyles(), this.props.style]
7878
}, this.props.children);
7979
}
8080
}

src/image.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ class Image extends Base {
1616
style={[
1717
this.context.styles.components.image,
1818
this.getStyles(),
19-
styles]} />
19+
styles,
20+
this.props.style]} />
2021
);
2122
}
2223
}

src/layout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Layout extends React.Component {
88
display: "flex"
99
};
1010
return (
11-
<div style={[styles]}>
11+
<div style={[styles, this.props.style]}>
1212
{this.props.children}
1313
</div>
1414
);

src/link.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Radium from "radium";
66
class Link extends Base {
77
render() {
88
return (
9-
<a href={this.props.href} style={[this.context.styles.components.link, this.getStyles()]}>
9+
<a href={this.props.href} style={[this.context.styles.components.link, this.getStyles(), this.props.style]}>
1010
{this.props.children}
1111
</a>
1212
);

src/list-item.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Radium from "radium";
66
class ListItem extends Base {
77
render() {
88
return (
9-
<li style={[this.context.styles.components.listItem, this.getStyles()]}>
9+
<li style={[this.context.styles.components.listItem, this.getStyles(), this.props.style]}>
1010
{this.props.children}
1111
</li>
1212
);

0 commit comments

Comments
 (0)