3.0.1 • Published 1 month ago

@axa-fr/react-toolkit-modal-default v3.0.1

Weekly downloads
110
License
MIT
Repository
github
Last release
1 month ago

@axa-fr/react-toolkit-modal-default

  1. Installation
  2. Custom Header Story
  3. Modal Core Story

Installation

npm i @axa-fr/react-toolkit-modal-default
npm i @axa-fr/react-toolkit-button

Custom Header Story

Import

import Modal from '@axa-fr/react-toolkit-modal-default';
import '@axa-fr/react-toolkit-modal-default/dist/af-modal.css';
import '@axa-fr/react-toolkit-button/dist/af-button.css';

Use

import { useRef } from 'react';

export const YourComponent = () => {
  const ref = useRef < HTMLDialogElement > null;

  return (
    <>
      <button type="button" onClick={() => ref.current?.showModal()}>
        Ouvrir la modal
      </button>

      <Modal onOutsideTap={() => ref.current?.close()} ref={ref}>
        <HeaderBase id="headerId">
          <p>
            Ici je contrôle complètement
            <b>le contenu</b>
          </p>
        </HeaderBase>
        <Body>
          <p>
            Reprehenderit sit quis aute nisi consequat consequat mollit. Commodo
            in aliquip consectetur nulla sit anim. Pariatur minim commodo enim
            ea eu laborum culpa laboris. Labore labore irure ipsum consequat
            enim officia anim ipsum aliqua excepteur qui sint. Duis sint do
            culpa adipisicing dolor adipisicing ea dolore aute nisi quis ullamco
            aliquip occaecat. Aute ut mollit amet.
          </p>
        </Body>
        <Footer>
          <button
            className="btn af-btn af-btn--reverse"
            type="button"
            onClick={() => ref.current?.close()}>
            Annuler
          </button>
          <button className="btn af-btn" type="button">
            Valider
          </button>
        </Footer>
      </Modal>
    </>
  );
};
3.0.1

1 month ago

3.0.0

1 month ago

3.0.0-alpha.1

2 months ago

3.0.0-alpha.2

2 months ago

3.0.0-alpha.0

3 months ago

2.3.1

7 months ago

2.3.1-alpha.0

7 months ago

2.3.0

8 months ago

2.3.0-alpha.2

8 months ago

2.3.0-alpha.0

10 months ago

2.2.0

11 months ago

2.2.0-alpha.0

11 months ago

2.2.0-alpha.1

11 months ago

2.1.1

11 months ago

2.1.1-alpha.0

11 months ago

2.1.0

12 months ago

2.1.0-alpha.6

1 year ago

2.1.0-alpha.5

1 year ago

2.1.0-alpha.4

1 year ago

2.1.0-alpha.3

1 year ago

2.0.1-alpha.1

1 year ago

2.1.0-alpha.2

1 year ago

2.1.0-alpha.1

1 year ago

2.0.0

2 years ago

2.0.1-alpha.0

2 years ago

2.0.0-alpha.11

2 years ago

2.0.0-alpha.8

2 years ago

2.0.0-alpha.9

2 years ago

2.0.0-alpha.10

2 years ago

2.0.0-alpha.3

3 years ago

2.0.0-alpha.4

3 years ago

2.0.0-alpha.5

3 years ago

1.4.1

3 years ago

1.4.0

4 years ago

2.0.0-alpha.0

4 years ago

2.0.0-alpha.1

4 years ago

1.4.0-alpha.1

4 years ago

1.4.0-alpha.0

4 years ago

1.3.23

4 years ago

1.3.21

4 years ago

1.3.16

4 years ago

1.3.15

4 years ago

1.3.14

4 years ago

1.3.13

4 years ago

1.3.12

4 years ago

1.3.11

5 years ago

1.3.10

5 years ago

1.3.9

5 years ago

1.3.9-alpha.0

5 years ago

1.3.8-alpha.0

5 years ago

1.3.7-alpha.0

5 years ago

1.3.6

5 years ago

1.3.6-alpha.0

5 years ago

1.3.5-alpha.0

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.2-alpha.0

5 years ago

1.2.16

5 years ago

1.2.15

5 years ago

1.2.14

5 years ago

1.2.13

5 years ago

1.2.12

5 years ago

1.2.11

5 years ago

1.2.10

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.6-alpha.0

5 years ago

1.2.5

6 years ago

1.2.5-alpha.0

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.2-alpha.0

6 years ago