Skip to content

Commit

Permalink
Apply prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
habubey committed May 17, 2023
1 parent cd72dad commit 0e349b8
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 40 deletions.
2 changes: 0 additions & 2 deletions components/doc/chart/pt/wireframe.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

import React from 'react';
import { DocSectionText } from '../../common/docsectiontext';

export const Wireframe = (props) => {

return (
<>
<DocSectionText {...props} />
Expand Down
2 changes: 1 addition & 1 deletion components/doc/fileupload/pt/ptdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function PTDemo() {
content: { className: 'surface-ground' },
message: {
root: {
className: "w-1rem"
className: 'w-1rem'
}
}
}}
Expand Down
2 changes: 0 additions & 2 deletions components/doc/fileupload/pt/wireframe.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

import React from 'react';
import { DocSectionText } from '../../common/docsectiontext';

export const Wireframe = (props) => {

return (
<>
<DocSectionText {...props} />
Expand Down
2 changes: 1 addition & 1 deletion components/lib/chart/Chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const PrimeReactChart = React.memo(
ref: canvasRef,
width: props.width,
height: props.height,
role: "img",
role: 'img',
'aria-label': ariaLabel
},
ptm('canvas')
Expand Down
26 changes: 11 additions & 15 deletions components/lib/fileupload/FileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,14 +393,14 @@ export const FileUpload = React.memo(
const inputProps = mergeProps(
{
ref: fileInputRef,
type: "file",
type: 'file',
onChange: (e) => onFileSelect(e),
multiple: props.multiple,
accept: props.accept,
disabled: chooseDisabled
},
ptm('input')
)
);
const input = <input {...inputProps} />;
const chooseIconProps = mergeProps(
{
Expand Down Expand Up @@ -442,8 +442,8 @@ export const FileUpload = React.memo(
const key = file.name + file.type + file.size;
const thumbnailProps = mergeProps(
{
role: "presentation",
className: "p-fileupload-file-thumbnail",
role: 'presentation',
className: 'p-fileupload-file-thumbnail',
src: file.objectURL,
width: props.previewWidth
},
Expand All @@ -454,12 +454,12 @@ export const FileUpload = React.memo(
const fileSizeProps = mergeProps(ptm('fileSize'));
const fileNameProps = mergeProps(
{
className: "p-fileupload-filename"
className: 'p-fileupload-filename'
},
ptm('fileName')
);
const actionsProps = mergeProps(ptm('actions'));
const fileName = <div {...fileNameProps} >{file.name}</div>;
const fileName = <div {...fileNameProps}>{file.name}</div>;
const size = <div {...fileSizeProps}>{formatSize(file.size)}</div>;

const contentBody = (
Expand Down Expand Up @@ -501,16 +501,12 @@ export const FileUpload = React.memo(
const fileProps = mergeProps(
{
key,
className: "p-fileupload-row",
className: 'p-fileupload-row'
},
ptm('file')
)

return (
<div {...fileProps}>
{content}
</div>
);

return <div {...fileProps}>{content}</div>;
};

const createFiles = () => {
Expand Down Expand Up @@ -621,7 +617,7 @@ export const FileUpload = React.memo(
{
id: props.id,
className,
style: props.style,
style: props.style
},
FileUploadBase.getOtherProps(props),
ptm('root')
Expand Down Expand Up @@ -680,7 +676,7 @@ export const FileUpload = React.memo(
const rootProps = mergeProps(
{
className,
style: props.style,
style: props.style
},
FileUploadBase.getOtherProps(props),
ptm('root')
Expand Down
35 changes: 17 additions & 18 deletions pages/chart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,23 @@ const ChartDemo = () => {
component: AccessibilityDoc
}
];
const ptDocs = [
{
id: 'pt.wireframe',
label: 'Wireframe',
component: Wireframe
},
{
id: 'pt.chart.options',
label: 'Chart PT Options',
component: DocApiTable
},
{
id: 'pt.demo',
label: 'Example',
component: PTDoc
}
];

const ptDocs = [
{
id: 'pt.wireframe',
label: 'Wireframe',
component: Wireframe
},
{
id: 'pt.chart.options',
label: 'Chart PT Options',
component: DocApiTable
},
{
id: 'pt.demo',
label: 'Example',
component: PTDoc
}
];

return <DocComponent title="React Chart Component" header="Chart" description="Chart components are based on Chart.js, an open source HTML5 based charting library." componentDocs={docs} apiDocs={['Chart']} ptDocs={ptDocs} />;
};
Expand Down
1 change: 0 additions & 1 deletion pages/fileupload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ const FileUploadDemo = () => {
}
];


return (
<DocComponent
title="React Upload Component"
Expand Down

0 comments on commit 0e349b8

Please sign in to comment.