Adding theme support for Text rendering component

This commit is contained in:
Jeff Avallone 2019-01-27 11:14:49 -05:00
parent fe714f2363
commit 35efa7cdb0
2 changed files with 7 additions and 3 deletions

View File

@ -5,9 +5,9 @@ import { getBBox } from 'layout';
import * as style from './style';
const Text = ({ transform, quoted, children }) => {
const Text = ({ transform, quoted, theme, children }) => {
const textProps = {
style: style.text,
style: { ...style.text, ...style[theme] },
transform
};
@ -22,6 +22,7 @@ const Text = ({ transform, quoted, children }) => {
Text.propTypes = {
quoted: PropTypes.bool,
theme: PropTypes.string,
transform: PropTypes.string,
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),

View File

@ -1,8 +1,11 @@
import { fontSize, fontFamily, grey } from 'rendering/style';
import { fontSize, fontFamily, white, grey } from 'rendering/style';
export const text = {
fontSize, fontFamily
};
export const anchor = {
fill: white
};
export const quote = {
fill: grey
};