New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

expo-doodle

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-doodle

A simple and minimal drawing library for Expo.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
0
Created
Source

expo-doodle

A simple and minimal drawing library for Expo.

Installation

To install expo-doodle, run the following command:

npm install expo-doodle

Usage

Here is a simple example to get started:

import { useRef } from "react";
import { View, Button } from "react-native";
import ExpoDoodle from "expo-doodle";

const App = () => {
  const undoRef = useRef(() => {});
  const clearRef = useRef(() => {});

  return (
    <View style={{ flex: 1 }}>
      <ExpoDoodle
        strokeWidth={4}
        color={"black"}
        clear={(clear) => (clearRef.current = clear)}
        undo={(undo) => (undoRef.current = undo)}
      />
      <Button title="Undo" onPress={() => undoRef.current()} />
      <Button title="Clear" onPress={() => clearRef.current()} />
    </View>
  );
};

export default App;

Props

PropTypeDefaultDescription
containerStylesobject{}Custom styles for the canvas container.
colorstring#000The color of the brush.
strokeWidthnumber4The size of the brush in pixels.
undofuncundefinedCallback function to undo the last action.
clearfuncundefinedCallback function to clear the canvas.

Compatibility

expo-doodle is compatible with Expo SDK 49 and above. It works well on both Android and iOS devices.

Contributing

Contributions are welcome! If you have a feature request, bug report, or would like to contribute to the codebase, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Keywords

react-native

FAQs

Package last updated on 22 Jan 2025

Did you know?

Socket

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