Skip to content

Theme: support style arrays on all components #4

Open
@jsonxr

Description

@jsonxr

Currently only a singluar style is supported.

Change to:

export interface Props {
  style?: TextStyle | TextStyle[]
}

export Component = ({style, ...props}) => {
  // ...
  let textStyle: TextStyle[] = [];
  if (style) {
    if (Array.isArray(style)) {
      textStyle = textStyle.concat(style);
    } else {
      textStyle.push(style);
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions