1.0.0 • Published 3 years ago

govil-strip-g-content v1.0.0

Weekly downloads
94
License
MIT
Repository
-
Last release
3 years ago

govil-strip-g-content

generic content that get dynamic data

How to use

Clone this repo to your local computer, then run:

  • npm install && npm run build

You can now import govil-strip-g-content as a normal package installed from npm like so:

import StripGContent from 'govil-strip-g-content';
...

You can also import the type definitions if you're using TypeScript like so:

import StripGContent, { ComponentModel } from 'govil-strip-g-content';
...

Available props/state Models

interface Model {
    vm: ComponentModel;
}
export interface ComponentModel {
    title: string
    subTitle: string
    description: string //html
    links: Array<LinkableTitle>
    contentId: string //for accessibility
    role: string //for accessibility
    labelledby: string //for accessibility
    resources: {
        collapseTitle: string,
        expandTitle: string,
    }
}
interface IStateModel {
    isExpandedLinks: boolean
}

//imported from 'govil-links'
interface LinkableTitle {
    title: string,
    url: string,
    isInternal: boolean
}

To customize this component, pass ComponentModel to the vm prop.

// your-component.js
import StripGContent, { ComponentModel } from 'govil-strip-g-content';

...
  { this.state.currentStepIndex === index &&
    <div className={css.content_container}>
      <StripGContent vm={this.state.currentStep} />
    </div>
  }
...

This component was built for the benefit of the citizens of Israel on behalf of the government, but of course also for the benefit of the OpenSource community and freely published in npm

1.0.0

3 years ago

0.0.23

3 years ago

1.0.1

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago