@cgi-learning-hub/ui
Version:
@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features
58 lines (57 loc) • 1.49 kB
JavaScript
import t from "../ImagePicker/ImagePicker.es.js";
const i = {
title: "Components/ImagePicker",
component: t,
argTypes: {
defaultLabel: {
description: "Le contenu affiché comme label par défaut (ReactNode).",
control: "text",
table: {
type: { summary: "ReactNode" },
defaultValue: { summary: "<ImagePickerDefaultLabel />" }
}
},
dragLabel: {
description: "Texte affiché lorsque l'utilisateur fait glisser un fichier.",
control: "text",
table: {
type: { summary: "ReactNode" },
defaultValue: { summary: "<ImagePickerDefaultDragLabel />" }
}
},
information: {
description: "Informations supplémentaires affichées sous le label par défaut.",
control: "text",
table: {
type: { summary: "string" }
}
},
onFileChange: {
description: "Callback déclenché lorsque l'utilisateur sélectionne ou supprime un fichier.",
action: "file-changed",
table: {
type: { summary: "(file: File | null) => void" }
}
},
initialFile: {
description: "Ajouter une image initiale",
control: "text",
table: {
type: { summary: "string | File" }
}
}
}
}, l = {
args: {
information: "SVG, PNG, JPG, GIF",
onFileChange: (e) => {
console.log(e ? "Image uplaodé" : "Image supprimé");
},
width: "160px",
height: "160px"
}
};
export {
l as Default,
i as default
};