Adding theme support for Text rendering component
This commit is contained in:
parent
fe714f2363
commit
35efa7cdb0
@ -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),
|
||||
|
@ -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
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user