Skip to content

border-radius is not work for Image #10

@pinqy520

Description

@pinqy520

um.. i'm not sure it is a cssta's issue.

for some reason (facebook/react-native#14148) Image component is not support corner-specific border radius like borderTopRightRadius. but cssta translates border-radius to four specific border radius, and it is not work for Image Component.


code:

const ImageRadius = cssta(Image) `
  width: 100px;
  height: 100px;
  border-radius: 50px;
  overflow: hidden;
`;


export default () => (
    <ImageRadius
        style={{ borderRadius: 10 }}
        source={{ uri: 'http://img1.skqkw.cn:888/2014/11/17/10/3u1qorvdoud-126128.jpg' }}
        resizeMode="cover" />
);

image

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