Skip to content

custom styles not working #5

@natashache

Description

@natashache

It seems setting custom styles doesn't do anything to the styles of the rendered object. Here's my code:


                <View style={[styles.section, { paddingTop: 31 }]}>
                      <RNDraftJSRender
                        contentState={JSON.parse(soundcast.long_description)}
                        customStyles={customStyles}
                      />
                </View>

where

        const customStyles = StyleSheet.flatten({
          link: {
            color: 'blue',
            fontWeight: 'bold',
          },
          paragraph: {
            fontSize: 14,
            color: Colors.fontBlack,
            fontWeight: 'normal',
            letterSpacing: -0.65,
            lineHeight: 14,
          },
        });

No matter how I changed the customStyles, the rendering doesn't change at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions