aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FontIconBox.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-10-15 13:42:13 -0400
committerbob <bcz@cs.brown.edu>2019-10-15 13:42:13 -0400
commit03f86e3b7b450699073c47aa43af23d31e0765d4 (patch)
tree74a5066ca8f15cab25a626894edf8ea9e46d01cb /src/client/views/nodes/FontIconBox.tsx
parent69d822d6c68b69e5bfeeff03942ea9bab71cecc3 (diff)
extensions for linearViews or nesting.
Diffstat (limited to 'src/client/views/nodes/FontIconBox.tsx')
-rw-r--r--src/client/views/nodes/FontIconBox.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/nodes/FontIconBox.tsx b/src/client/views/nodes/FontIconBox.tsx
index 3f5afb6d1..aa442cd92 100644
--- a/src/client/views/nodes/FontIconBox.tsx
+++ b/src/client/views/nodes/FontIconBox.tsx
@@ -5,6 +5,7 @@ import { createSchema, makeInterface } from '../../../new_fields/Schema';
import { DocComponent } from '../DocComponent';
import './FontIconBox.scss';
import { FieldView, FieldViewProps } from './FieldView';
+import { StrCast } from '../../../new_fields/Types';
const FontIconSchema = createSchema({
icon: "string"
});
@@ -16,6 +17,8 @@ export class FontIconBox extends DocComponent<FieldViewProps, FontIconDocument>(
public static LayoutString() { return FieldView.LayoutString(FontIconBox); }
render() {
- return <button className="fontIconBox-outerDiv" > <FontAwesomeIcon className="fontIconBox-icon" icon={this.Document.icon as any} size="sm" color="white" /> </button>;
+ return <button className="fontIconBox-outerDiv" style={{ background: StrCast(this.props.Document.backgroundColor) }}>
+ <FontAwesomeIcon className="fontIconBox-icon" icon={this.Document.icon as any} size="sm" color="white" />
+ </button>;
}
} \ No newline at end of file