diff --git a/content/pages/publish.json b/content/pages/publish.json index 8cd3fb93d..af3d784a8 100644 --- a/content/pages/publish.json +++ b/content/pages/publish.json @@ -11,6 +11,13 @@ "help": "Enter a concise title.", "required": true }, + { + "name": "description", + "label": "Description", + "help": "Add a thorough description with as much detail as possible. You can use [Markdown](https://daringfireball.net/projects/markdown/basics).", + "type": "textarea", + "required": true + }, { "name": "files", "label": "Files", @@ -19,13 +26,6 @@ "type": "files", "required": true }, - { - "name": "description", - "label": "Description", - "help": "Add a thorough description with as much detail as possible.", - "type": "textarea", - "required": true - }, { "name": "access", "label": "Access Type", diff --git a/src/components/atoms/File.module.css b/src/components/atoms/File.module.css index 733b8fd6f..fb9bef081 100644 --- a/src/components/atoms/File.module.css +++ b/src/components/atoms/File.module.css @@ -1,4 +1,5 @@ .file { + font-size: var(--font-size-small); background: var(--color-secondary); background-size: 100%; padding: var(--spacer) calc(var(--spacer) / 2); @@ -10,7 +11,6 @@ } .file li { - font-size: var(--font-size-small); color: var(--brand-white); } @@ -18,3 +18,9 @@ font-size: var(--font-size-mini); opacity: 0.75; } + +.file.small { + font-size: var(--font-size-mini); + height: 5.75rem; + width: 4.5rem; +} diff --git a/src/components/atoms/File.tsx b/src/components/atoms/File.tsx index 444059422..65a40893e 100644 --- a/src/components/atoms/File.tsx +++ b/src/components/atoms/File.tsx @@ -1,14 +1,31 @@ import React, { ReactElement } from 'react' import { File as FileMetadata } from '@oceanprotocol/lib/dist/node/ddo/interfaces/File' import filesize from 'filesize' +import classNames from 'classnames/bind' import cleanupContentType from '../../utils/cleanupContentType' import styles from './File.module.css' -export default function File({ file }: { file: FileMetadata }): ReactElement { +const cx = classNames.bind(styles) + +export default function File({ + file, + className, + small +}: { + file: FileMetadata + className?: string + small?: boolean +}): ReactElement { if (!file) return null + const styleClasses = cx({ + file: true, + small: small, + [className]: className + }) + return ( -