Skip to content

Setting width/height as a percentage in react native #274

@gorbypark

Description

@gorbypark

From my experimentation, the only thing that affects the size of the generated QR code on react native is the size prop. No combination of view styles, parent view styles or even viewBox will make a difference, it's always sized exactly as the size prop is (and when removing the size prop, it's always 256x256).

I'd like to have it full width, aspect ratio 1, without resorting to measuring the screen width (because I have padding and etc on the box it's displayed in) or onLayout measuring the parent container.

Is it possible somehow that I'm overlooking?

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