npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@adamantic/filecloud-upload-react

v2.0.1

Published

A simple and customizable React component to upload files to FileCloud

Downloads

7

Readme

FileCloudUpload - REACT

A simple form to upload your files to FileCloud with React.

PREREQUISITES

You must have at least React 17.0.2 and React Dom 17.0.2

INSTALL

npm install @adamantic/filecloud-upload-react

USAGE

Import FileCloudUpload inside the component where you need to use it.

import { FileCloudUpload } from 'filecloud-upload-react/dist/cjs';

<FileCloudUpload />

| WARNING: FileCloudUpload needs some mandatory props. Read below to find out how to use it. | | --- |

PROPS

| N.B.: Default values are not currently implemented. Configure everything before using. | | --- |


interface FileCloudUploadProps {
  serverUrl: string; // the server base url
  fileCloudRequestCode: string; // the request code to authenticate on FileCloud
  title?: string; // a title on the component's top -- OPTIONAL
  closeIcon: any; // an icon shown to remove uploaded document
  loader: any; // a loader (icon / component / text ) to show inside the submit button
  onSuccess: () => void; // a function to run on upload success
  onFailure: () => void; // a function to run on upload failure
  tabsToShow: DocumentTabItem[]; // Look on the next block
  fileCloudProperties: CssProperties; // Look on the next block
};
interface DocumentTabItem {
    name: 'ID_CARD' | 'PASSPORT'; // ID_CARD has two sides two load, passport only one
    title: string; // shown inside the tab
    placeholderButton: string; 
    // If tab item has more then one side to load, with the placeholder is shown the index"
}


interface CssProperties {
  backgroundColor: string;
  padding: string;
  title: {
    color: string;
    fontSize: string;
  };
  tabsContainer: {
    marginRight: string;
    marginLeft: string;
    marginTop: string;
    marginBottom: string;
    tabStyle: {
      marginRight: string;
      marginLeft: string;
      activeBorderBottomColor: string;
      color: string;
    };
  };
  form: {
    fieldsPerRow: number;
    fieldHeight: string;
    fieldPaddingLeft: string;
    fieldPaddingRight: string;
    fieldMarginTop: string;
    fieldMarginBottom: string;
    fieldMarginRight: string;
    fieldMarginLeft: string;
    backgroundColor: string;
    borderRadius: string;
    color: string;
    borderColor: string;
    documentsNotValidErrorMessage: string;
    sendButtonText: string;
    labels: {
      name: string;
      expiryDate: string;
      issuingCountry: string;
    };
    placeholders: {
      name: string;
      expiryDate: string;
      issuingCountry: string;
    };
  };
  button: {
    marginTop: string;
    marginBottom: string;
    borderColor: string;
    width: string;
    color: string;
    height: string;
    backgroundColor: string;
    borderRadius: string;
  };
};