summaryrefslogtreecommitdiffstats
path: root/front/odiparpack/app/containers/UiElements/Notification.js
blob: b00f24ebd43972dae65adb18752e7e93f6db5069 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import React from 'react';
import { Helmet } from 'react-helmet';
import brand from 'ba-api/brand';
import { SourceReader, PapperBlock } from 'ba-components';
import { Grid } from '@material-ui/core';
import { SimpleNotif, StyledNotif, TransitionNotif, MobileNotif } from './demos';

class Notification extends React.Component {
  render() {
    const title = brand.name + ' - UI Elements';
    const description = brand.desc;
    const docSrc = 'containers/UiElements/demos/Notification/';
    return (
      <div>
        <Helmet>
          <title>{title}</title>
          <meta name="description" content={description} />
          <meta property="og:title" content={title} />
          <meta property="og:description" content={description} />
          <meta property="twitter:title" content={title} />
          <meta property="twitter:description" content={description} />
        </Helmet>
        <PapperBlock title="Snackbars/Notification" desc="Snackbars provide brief feedback about an operation through a message - typically at the bottom of the screen.">
          <div>
            <SimpleNotif />
            <SourceReader componentName={docSrc + 'SimpleNotif.js'} />
          </div>
        </PapperBlock>
        <PapperBlock title="Styled Notification" desc="Some snackbars with varying message style. And some snackbars with varying message length.">
          <div>
            <StyledNotif />
            <SourceReader componentName={docSrc + 'StyledNotif.js'} />
          </div>
        </PapperBlock>
        <PapperBlock title="Mobile Notification" desc="Move the floating action button vertically to accommodate the snackbar height.">
          <div>
            <Grid container justify="center">
              <Grid item md={4} xs={12}>
                <MobileNotif />
              </Grid>
            </Grid>
            <SourceReader componentName={docSrc + 'MobileNotif.js'} />
          </div>
        </PapperBlock>
        <PapperBlock title="Transition" desc="Per Google's guidelines, when a second snackbar is triggered while the first is displayed, the first should start the contraction motion downwards before the second one animates upwards.">
          <div>
            <TransitionNotif />
            <SourceReader componentName={docSrc + 'TransitionNotif.js'} />
          </div>
        </PapperBlock>
      </div>
    );
  }
}

export default Notification;