intraactive-framework-spfx-imagepicker
TypeScript icon, indicating that this package has built-in type declarations

1.0.30 • Public • Published

IntraActive Framework - SPFx Image Picker

IntraActive Framework's "Image Picker" package is a SPFx component used to upload/select images and to a SharePoint list and retur the URL.

Installation

`$ npm install intraactive-framework-spfx-imagepicker

Import

import IAImagePicker from 'intraactive-framework-spfx-imagepicker'

Usage

<IAImagePicker 
  label="[YOUR_TEXT]" 
  inputFieldPlaceholderText="[YOUR_TEXT]" 
  uploadButtonLabel="[YOUR_TEXT]"
  selectButtonLabel="[YOUR_TEXT]" 
  imageListTitle="[YOUR_LIST_TITLE]" 
  onChange={(url: string) => console.log(url)} 
  defaultImageUrl="[YOUR_TEXT]" 
  spService={[JSOM_SERVICE]}
/>

Example

import * as React from 'react';
import { IDesignSettingsProps } from './IDesignSettingsProps';
import JSOMListService from 'intraactive-framework-jsomservice';

export interface IDesignSettingsState {
  spService: JSOMListService;
}

export default class DesignSettings extends React.Component<IDesignSettingsProps, IDesignSettingsState> {

  constructor(props: IDesignSettingsProps) {
    super(props);
    this.state = {
      spService: props.serviceScope.consume(JSOMListService.serviceKey)
    };
  }

  public render(): React.ReactElement<IDesignSettingsProps> {
    return (
      <IAImagePicker 
        label="Indsæt et logo" 
        inputFieldPlaceholderText="Indsæt billedlink" 
        uploadButtonLabel="Upload" 
        selectButtonLabel="Select" 
        imageListTitle="Infoscreen Assets" 
        onChange={(url: string) => console.log(url)} 
        defaultImageUrl="" 
        spService={this.state.spService}
      />
    );
  }
}

Readme

Keywords

Package Sidebar

Install

npm i intraactive-framework-spfx-imagepicker

Weekly Downloads

5

Version

1.0.30

License

MIT

Unpacked Size

1.65 MB

Total Files

5

Last publish

Collaborators

  • jonasbrink
  • nielsbrinch_proactive
  • smukked