Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update file size descriptions to match IBM style guide #17883

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function uid(prefix = 'id') {
lastId++;
return `${prefix}${lastId}`;
}
const prefix = 'cds';
const prefix = 'cds';

export const ExampleDropContainerApp = (props) => {
const [files, setFiles] = useState([]);
Expand Down Expand Up @@ -50,7 +50,7 @@ export const ExampleDropContainerApp = (props) => {
iconDescription: 'Delete file',
invalid: true,
errorSubject: 'File size exceeds limit',
errorBody: '500kb max file size. Select a new file and try again.',
errorBody: '500 KB max file size. Select a new file and try again.',
};
setFiles((files) =>
files.map((file) =>
Expand Down Expand Up @@ -154,7 +154,7 @@ export const ExampleDropContainerApp = (props) => {
<FormItem>
<p className={labelClasses}>Upload files</p>
<p className={helperTextClasses}>
Max file size is 500kb. Supported file types are .jpg and .png.
Max file size is 500 KB. Supported file types are .jpg and .png.
</p>
<FileUploaderDropContainer
{...props}
Expand Down Expand Up @@ -194,4 +194,4 @@ export const ExampleDropContainerApp = (props) => {
</div>
</FormItem>
);
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const Default = () => {
<div className="cds--file__container">
<FileUploader
labelTitle="Upload files"
labelDescription="Max file size is 500mb. Only .jpg files are supported."
labelDescription="Max file size is 500 MB. Only .jpg files are supported."
buttonLabel="Add file"
buttonKind="primary"
size="md"
Expand All @@ -55,7 +55,7 @@ export const Default = () => {
export const _FileUploaderItem = (args) => {
return (
<FileUploaderItem
errorBody="500kb max file size. Select a new file and try again."
errorBody="500 KB max file size. Select a new file and try again."
errorSubject="File size exceeds limit"
iconDescription="Delete file"
invalid={false}
Expand Down Expand Up @@ -186,7 +186,7 @@ export const Playground = (args) => {
};
Playground.args = {
labelTitle: 'Upload files',
labelDescription: 'Max file size is 500mb. Only .jpg files are supported.',
labelDescription: 'Max file size is 500 MB. Only .jpg files are supported.',
buttonLabel: 'Add file',
buttonKind: 'primary',
size: 'md',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const requiredProps = {
iconDescription,
filenameStatus: 'uploading',
labelTitle: 'Upload files',
labelDescription: 'Max file size is 500mb. Only .jpg files are supported.',
labelDescription: 'Max file size is 500 MB. Only .jpg files are supported.',
};

describe('FileUploader', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const ExampleDropContainerApp = (props) => {
iconDescription: 'Delete file',
invalid: true,
errorSubject: 'File size exceeds limit',
errorBody: '500kb max file size. Select a new file and try again.',
errorBody: '500 KB max file size. Select a new file and try again.',
};
setFile(updatedFile);
return;
Expand Down Expand Up @@ -150,7 +150,7 @@ const ExampleDropContainerApp = (props) => {
name={file.name}
filesize={file.filesize}
errorSubject="File size exceeds limit"
errorBody="500kb max file size. Select a new file and try again."
errorBody="500 KB max file size. Select a new file and try again."
// eslint-disable-next-line react/prop-types
size={props.size}
status={file.status}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const ExampleDropContainerApp = (props) => {
iconDescription: 'Delete file',
invalid: true,
errorSubject: 'File size exceeds limit',
errorBody: '500kb max file size. Select a new file and try again.',
errorBody: '500 KB max file size. Select a new file and try again.',
};
setFiles((files) =>
files.map((file) =>
Expand Down Expand Up @@ -154,7 +154,7 @@ const ExampleDropContainerApp = (props) => {
<FormItem>
<p className={labelClasses}>Upload files</p>
<p className={helperTextClasses}>
Max file size is 500kb. Supported file types are .jpg and .png.
Max file size is 500 KB. Supported file types are .jpg and .png.
</p>
<FileUploaderDropContainer
{...props}
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Form/Form.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const Default = () => (
{...fileUploaderEvents}
id="file-1"
role="button"
labelDescription="Max file size is 500mb. Only .jpg files are supported."
labelDescription="Max file size is 500 MB. Only .jpg files are supported."
buttonLabel="Add file"
buttonKind="primary"
size="md"
Expand Down
Loading