Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

abacus-notepad-component

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abacus-notepad-component

An example usage of AlloyEditor on the server and in the browser

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

abacus-notepad-component

Example usage:

const onNotepadChange = html =>
  this.props.updateNotepad(currentTestId, html)

const notepad     = this.props.store.getIn([ 'app', 'notepad' ])
const notepadHTML = notepad && notepad.get('html')
notepad && logger.debug('notepad', notepadHTML)

const shouldShowNotepad = this.props.store.getIn([ 'app', 'shouldShowNotepad' ])

logger.debug(currentTest.toJS())

const notepadArea =
  shouldShowNotepad && currentTestId && notepadHTML ?
    <NotepadComponent
      label={`Notes for ${currentTestId}`}
      html={notepadHTML}
      onChange={onNotepadChange} />
    :
    <div className="notepad col-xs-12"></div>;

Pretty much everything in this component has defaults but can be changed via props:

static defaultProps = {
  alloyEditorConfig : { allowedContent : true },
  changeDelay       : 2000,
  html              : ABACUS_NOTEPAD_INNER_HTML,
  id                : ABACUS_NOTEPAD_HTML_ELEMENT_ID,
  containerId       : ABACUS_NOTEPAD_CONTAINER_HTML_ELEMENT_ID,
  label             : ABACUS_NOTEPAD_LABEL_TEXT,
  labelStyle        : {
    display     : 'block',
    fontSize    : '1.2em',
    color       : '#2F4761'
  },
  containerStyle    : {
    position    : 'relative',
    margin      : '2.63em auto',
    width       : '92%',
    minHeight   : '18em',
    minWidth    : '10em'
  },
  style             : {
    border      : '1px solid #2F4761',
    padding     : '1em',
    background  : 'linear-gradient(rgb(244, 245, 240),rgb(244, 245, 240),rgb(255,255,255))',
    margin      : '0em auto',
    height      : '100%',
    width       : '100%'
  }
};

FAQs

Package last updated on 16 Mar 2016

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc