2.1.2 • Published 4 years ago

@sis-cc/dotstatsuite-ui-header v2.1.2

Weekly downloads
19
License
MIT
Repository
-
Last release
4 years ago

sis-header

A header view component for Table and Charts.

setup

  • install: npm i sis-header (with the nexus configuration)
  • live: ./node_modules/web-component-env/wce start

usage

You can pass other components as children to be rendered inside this component

import Header from 'sis-header';
import Share from 'oecd-share';

<div>
  <Header
    subtitle={subtitle}
    title={title}
    toggleInfoRequest={null}
    uprs={uprs}
  >
    <Share {...shareData} />
  </Header>
</div>

api

title <string>

'Key Short-Term Economic Indicators'

subtitle <string>

'Measure: Growth previous period - Frequency: Annual - Time: 2015'

uprs <object> subset of data attributes

{
  U: {
    "id": "UNIT",
    "name": "Unit",
    "values": [
      {
        "id": "PC",
        "name": "Percentage"
      }
    ],
    role": "UNIT_MEASURE"
  },
  P: { ... },
  R: { ... }
}

note: if any of this attributes has more than one value, only the first one will be considered

toggleInfoRequest <function>

Optional parameter, if present, component will render an information icon next to the title, who will call this function on click.

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.4.3

5 years ago

1.4.2

5 years ago