bpk-component-overlay

3.1.2 • Public • Published

bpk-component-overlay

Backpack overlay component.

Installation

npm install bpk-component-overlay --save-dev

Usage

import React from 'react';
import BpkText from 'bpk-component-text';
import BpkOverlay, { BORDER_RADIUS_STYLES, OVERLAY_TYPES } from 'bpk-component-overlay';

export default () => (
  <div>
    { /* Basic example */}
    <BpkOverlay>
      <BpkText>Hotels in Canada</BpkText>
    </BpkOverlay>

    { /* With the tint invisible */}
    <BpkOverlay overlayType={OVERLAY_TYPES.none}>
      <BpkText>Hotels in Canada</BpkText>
    </BpkOverlay>

    { /* With a border radius style */}
    <BpkOverlay borderRadiusStyle={BORDER_RADIUS_STYLES.sm}>
      <BpkText>Hotels in Canada</BpkText>
    </BpkOverlay>

    { /* With foreground content */}
    <BpkOverlay foregroundContent={<BpkText>Visit Ottawa</BpkText>}>
      <BpkText>Hotels in Canada</BpkText>
    </BpkOverlay>
  </div>
);

Props

Property PropType Required Default Value
children Node true -
borderRadiusStyle oneOf(BORDER_RADIUS_STYLES.none, BORDER_RADIUS_STYLES.sm) false BORDER_RADIUS_STYLES.none
className string false null
foregroundContent Node false null
overlayType oneOf(OVERLAY_TYPES) false OVERLAY_TYPES.tint

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.1.23latest

Version History

VersionDownloads (Last 7 Days)Published
3.1.23
3.1.11
3.1.01
3.0.60
3.0.50
3.0.40
3.0.31
3.0.20
3.0.10
3.0.01
2.1.160
2.1.151
2.1.140
2.1.130
2.1.120
2.1.110
2.1.100
2.1.91
2.1.81
2.1.71
2.1.61
2.1.50
2.1.40
2.1.30
2.1.21
2.1.11
2.1.00
2.0.331
2.0.320
2.0.310
2.0.301
2.0.291
2.0.280
2.0.270
2.0.261
2.0.251
2.0.240
2.0.230
2.0.220
2.0.210
2.0.200
2.0.190
2.0.181
2.0.171
2.0.161
2.0.150
2.0.140
2.0.131
2.0.120
2.0.111
2.0.100
2.0.90
2.0.80
2.0.71
2.0.60
2.0.51
2.0.41
2.0.30
2.0.20
2.0.11
2.0.00
1.1.70
1.1.41
1.1.31
1.1.21
1.1.10
1.1.00
1.0.470
1.0.461
1.0.450
1.0.441
1.0.430
1.0.420
1.0.410
1.0.401
1.0.390
1.0.380
1.0.371
1.0.360
1.0.351
1.0.340
1.0.330
1.0.321
1.0.311
1.0.300
1.0.290
1.0.280
1.0.271
1.0.260
1.0.250
1.0.240
1.0.231
1.0.220
1.0.211
1.0.200
1.0.191
1.0.180
1.0.171
1.0.161
1.0.151
1.0.141
1.0.131
1.0.120
1.0.111
1.0.100
1.0.90
1.0.81
1.0.70
1.0.61
1.0.51
1.0.41
1.0.30
1.0.21
1.0.10
1.0.00

Package Sidebar

Install

npm i bpk-component-overlay

Weekly Downloads

27

Version

3.1.2

License

Apache-2.0

Unpacked Size

24.7 kB

Total Files

10

Last publish

Collaborators

  • ojcurt
  • frugoman
  • gert-jan.vercauteren
  • skyscanner-koalasquad
  • anambl
  • shaundon