Socket
Socket
Sign inDemoInstall

@bacons/css-to-expo-linear-gradient

Package Overview
Dependencies
514
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @bacons/css-to-expo-linear-gradient

Convert a CSS linear gradient function to expo-linear-gradient props


Version published
Weekly downloads
904
decreased by-29.54%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@bacons/css-to-expo-linear-gradient

Demo: snack

Convert a CSS linear gradient function to expo-linear-gradient props.

Add the package to your npm dependencies

yarn add @bacons/css-to-expo-linear-gradient

Usage

import { fromCSS } from "@bacons/css-to-expo-linear-gradient";
import { LinearGradient } from "expo-linear-gradient";

function App() {
  return (
    <LinearGradient
      {...fromCSS(
        `linear-gradient(0deg, #ff008450 0%, #fca40040 25%, #ffff0030 40%, #00ff8a20 60%, #00cfff40 75%, #cc4cfa50 100%);`
      )}
    />
  );
}

Attribution

Most of the code is adapted from this project which converts CSS linear gradients to canvas gradients.

Keywords

FAQs

Last updated on 10 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc