1.0.7 • Published 3 years ago

fxgcomponent_emmar009 v1.0.7

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

TP1 - Composants React

:women_wrestling: Équipe

Stéphanie Denis (steden001) et Emeline Marquès (emmar009)

:page_facing_up: Description

Il s'agit de la création d'une bibliothèque de 10 composants React ayant chacun 3 stories différentes.

La liste des composants :

:arrow_forward: Pour démarrer le projet :

yarn install
yarn storybook

:books: Les composantes

:large_orange_diamond: Alert

:small_orange_diamond: Description

Permet d'afficher un message d'alerte.

:small_orange_diamond: Librairie utilisée

mui Version : 5.2.7

:small_orange_diamond: Exemple

const Success = Template.bind({});
Success.args={
    variant:'outlined',
    color: 'success',
    severity: 'success'
}

:small_orange_diamond: Élément(s) personnalisable(s)

NomTypeValeur(s) disponible(s)
variantstringoutlined, filled
severitystringerror, warning, info, success
colorstringerror, warning, info, success

:large_orange_diamond: Badge

:small_orange_diamond: Description

Permet de créer un badge.

:small_orange_diamond: Librairie utilisée

antd Version : 4.18.2

:small_orange_diamond: Exemple

const Green = Template.bind({});
Green.args={
    text:'citron vert',
    color:'lime'
}

:small_orange_diamond: Élément(s) personnalisable(s)

NomTypeValeur(s) disponible(s)
textstringau choix
colorstringpink, red, yellow, orange, cyan, green, blue, purple, geekblue, magenta, volcano, gold, lime

:large_orange_diamond: Button

:small_orange_diamond: Description

Permet de créer un bouton.

:small_orange_diamond: Librairie utilisée

mui Version : 5.2.7

:small_orange_diamond: Exemple

const Principal = Template.bind({});
Principal.args={
    variant: 'outlined',
    color:'primary',
    size:'medium',
    disabled:false,
    text:'Principal'
}

:small_orange_diamond: Élément(s) personnalisable(s)

NomTypeValeur(s) disponible(s)
variantstringtext, contained, outlined
colorstringinherit, primary, secondary, success, error, info, warning
sizestringsmall, medium, large
disabledbooleantrue, false
textstringTexte du bouton au choix

:large_orange_diamond: Card

:small_orange_diamond: Description

Permet de créer une carte avec une image d'illustration ainsi que du texte.

:small_orange_diamond: Librairie utilisée

react-bootstrap Version : 2.5.0

:small_orange_diamond: Exemple

const Small = Template.bind({});
Small.args = {
  width: '200px',
  title:'Petit titre',
  variant:'primary'
};

:small_orange_diamond: Élément(s) personnalisable(s)

NomTypeValeur(s) disponible(s)
widthstringAu choix, pour changer la largeur de la carte
titlestringTitre au choix
variantstringprimary, secondary, success, danger, warning, info, light, dark

:large_orange_diamond: Carousel

:small_orange_diamond: Description

Permet de créer un carousel d'images avec un titre.

:small_orange_diamond: Librairie utilisée

antd Version : 4.18.2

:small_orange_diamond: Exemple

const Small = Template.bind({});
Small.args={
    width: '200px',
    background:'#ac9a66',
    height: '180px',
    color: '#fff',
    lineHeight: '180px',
    textAlign: 'center'
}

:small_orange_diamond: Élément(s) personnalisable(s)

NomTypeValeur(s) disponible(s)
widthstringAu choix, pour changer la largeur du carousel
backgroundstringAu choix, entrer un code hexadécimal
heigthstringAu choix, pour changer la hauteur du h3
colorstringAu choix, entrer un code hexadécimal
lineHeightstringAu choix pour changer la hauteur de l'interlignage
textAlignstringleft, center, right, justify

:large_orange_diamond: Checkbox

:small_orange_diamond: Description

Permet de créer des checkbox.

:small_orange_diamond: Librairie utilisée

mui Version : 5.2.7

:small_orange_diamond: Exemple

const Bleu = Template.bind({});
Bleu.args={
    color: 'primary'
}

:small_orange_diamond: Élément(s) personnalisable(s)

NomTypeValeur(s) disponible(s)
colorstringinherit, primary, secondary, success, error, info, warning

:large_orange_diamond: Collection

:small_orange_diamond: Description

Permet de créer une collection d'images.

:small_orange_diamond: Librairie utilisée

antd Version : 4.18.2

:small_orange_diamond: Exemple

const Small = Template.bind({});
Small.args = {
  imagesurl: img,
  width: 100
};

:small_orange_diamond: Élément(s) personnalisable(s)

NomTypeValeur(s) disponible(s)
imageurlarrayAjouter des images
widthnumberModifier la largeur, au choix

:large_orange_diamond: Pagination

:small_orange_diamond: Description

:small_orange_diamond: Librairie utilisée

antd Version : 4.18.2

:small_orange_diamond: Exemple

const Vingt = Template.bind({});
Vingt.args={
    defaultCurrent: 1,
    total: 200
};

:small_orange_diamond: Élément(s) personnalisable(s)

NomTypeValeur(s) disponible(s)
defaultCurrentnumberIndique le numéro de page initial par défaut
totalnumberRemplacer par le nombre d'éléments souhaité

:large_orange_diamond: Progress

:small_orange_diamond: Description

:small_orange_diamond: Librairie utilisée

antd Version : 4.18.2

:small_orange_diamond: Exemple

const Petit = Template.bind({});
Petit.args = {
    percent:30
};

:small_orange_diamond: Élément(s) personnalisable(s)

NomTypeValeur(s) disponible(s)
percentnumberEntre 0 et 100

:large_orange_diamond: Spin

:small_orange_diamond: Description

:small_orange_diamond: Librairie utilisée

antd Version : 4.18.2

:small_orange_diamond: Exemple

const Small = Template.bind({});
Small.args={
    size:'small'
}

:small_orange_diamond: Élément(s) personnalisable(s)

NomTypeValeur(s) disponible(s)
sizestringsmall, medium, large