
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
@axa-fr/react-toolkit-form-input-file
Advanced tools
1. [File](#file) 2. [File with values](#file-with-values) 3. [File with errors](#file-with-errors) 4. [FileInput](#fileinput) 1. [FileInput Required](#fileinput-required)
@axa-fr/react-toolkit-form-input-file
npm i @axa-fr/react-toolkit-form-input-file
npm i @axa-fr/react-toolkit-button
npm i @axa-fr/react-toolkit-form-core
import { File } from '@axa-fr/react-toolkit-form-input-file';
import '@axa-fr/react-toolkit-form-input-file/dist/af-file.css';
import '@axa-fr/react-toolkit-button/dist/af-button.css';
import '@axa-fr/react-toolkit-form-core/dist/af-form.css';
const FileInput = () => (
<form className="af-form" name="myform">
<div className="col-md-4">
<File
id="uniqueid"
name="placeImage"
accept="image/jpeg, image/png, application/*"
onChange={(e) => {
console.log(e);
}}
label="Browse"
icon="open"
/>
</div>
</form>
);
export default FileInput;
npm i @axa-fr/react-toolkit-form-input-file
npm i @axa-fr/react-toolkit-button
npm i @axa-fr/react-toolkit-form-core
import { File, FileTable } from '@axa-fr/react-toolkit-form-input-file';
import '@axa-fr/react-toolkit-form-input-file/dist/af-file.css';
import '@axa-fr/react-toolkit-button/dist/af-button.css';
import { HelpMessage } from '@axa-fr/react-toolkit-form-core';
import '@axa-fr/react-toolkit-form-core/dist/af-form.css';
const values = [
{
id: '000003',
file: {
name: 'error-file.jpg',
size: 100,
preview: 'https://via.placeholder.com/150Cx50',
type: 'image',
},
},
{
id: '000004',
file: {
name: 'fichier.png',
size: 100,
preview: 'https://via.placeholder.com/150Cx50',
type: 'image',
},
},
{
id: '000005',
file: {
name: 'fichier.csv',
size: 100,
preview: 'https://via.placeholder.com/150Cx50',
},
},
];
const FileWithValues = () => (
<form className="af-form" name="myform">
<div className="col-md-4">
<File
id="uniqueid"
name="placeImage"
accept="image/jpeg, image/png, application/*"
onChange={() => {
console.log('your function');
}}
label="Browse"
icon="open"
/>
<FileTable
errors={[]}
values={values}
onClick={(e) => {
console.log(e);
}}
/>
<HelpMessage message="Enter the place name, ex : Webcenter" />
</div>
</form>
);
export default FileWithValues;
npm i @axa-fr/react-toolkit-form-input-file
npm i @axa-fr/react-toolkit-button
npm i @axa-fr/react-toolkit-form-core
import { File, FileTable } from '@axa-fr/react-toolkit-form-input-file';
import '@axa-fr/react-toolkit-form-input-file/dist/af-file.css';
import '@axa-fr/react-toolkit-button/dist/af-button.css';
import { HelpMessage } from '@axa-fr/react-toolkit-form-core';
import '@axa-fr/react-toolkit-form-core/dist/af-form.css';
const values = [
{
id: '000003',
file: {
name: 'error-file.jpg',
size: 100,
preview: 'https://via.placeholder.com/150Cx50',
type: 'image',
},
},
{
id: '000004',
file: {
name: 'fichier.png',
size: 100,
preview: 'https://via.placeholder.com/150Cx50',
type: 'image',
},
},
{
id: '000005',
file: {
name: 'fichier.csv',
size: 100,
preview: 'https://via.placeholder.com/150Cx50',
},
},
];
let errors = [
{
id: '000003',
file: {
name: 'error-file.jpg',
size: 100,
preview: 'https://via.placeholder.com/150Cx50',
},
},
{
id: '000004',
file: {
name: 'fichier.png',
size: 100,
preview: 'https://via.placeholder.com/150Cx50',
},
},
{
id: '000005',
file: {
name: 'fichier.csv',
size: 100,
preview: 'https://via.placeholder.com/150Cx50',
},
},
];
const FileWithErrors = () => (
<form className="af-form" name="myform">
<div className="col-md-4">
<File
id="uniqueid"
name="placeImage"
accept="image/jpeg, image/png, application/*"
multiple={false}
label="Browse"
icon="open"
onChange={(e) => e}
/>
<HelpMessage message="Enter the place name, ex : Webcenter" />
<FileTable
errors={errors}
values={values}
onClick={(e) => {
console.log(e);
}}
/>
</div>
</form>
);
export default FileWithErrors;
import { FileInput } from '@axa-fr/react-toolkit-form-input-file';
import '@axa-fr/react-toolkit-form-input-file/dist/af-file.css';
import '@axa-fr/react-toolkit-button/dist/af-button.css';
import { MessageTypes } from '@axa-fr/react-toolkit-form-core';
import '@axa-fr/react-toolkit-form-core/dist/af-form.css';
const FileInputReturn = () => (
<FileInput
id="uniqueid"
label="Picture"
name="placeImage"
accept="image/jpeg, image/png, application/*"
onChange={(e) => {
console.log(e);
}}
helpMessage="Take a photo af a place"
messageType={MessageTypes.error}
/>
);
export default FileInputReturn;
To achieve FileInput Required, you need to add this :
classModifier = 'required';
to the FileInput component
FAQs
1. [File](#file) 2. [File with values](#file-with-values) 3. [File with errors](#file-with-errors) 4. [FileInput](#fileinput) 1. [FileInput Required](#fileinput-required)
The npm package @axa-fr/react-toolkit-form-input-file receives a total of 26 weekly downloads. As such, @axa-fr/react-toolkit-form-input-file popularity was classified as not popular.
We found that @axa-fr/react-toolkit-form-input-file demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.