From 1a006f5b3f766d4d71dee27689891f1cd23821b9 Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Thu, 19 Mar 2020 15:02:38 +0300 Subject: [PATCH] document scss moved to file css --- src/components/File/index.tsx | 10 +++++--- src/components/File/styles.css | 25 ++++++++++++++++++ src/style/components/document.scss | 41 ------------------------------ 3 files changed, 31 insertions(+), 45 deletions(-) create mode 100644 src/components/File/styles.css delete mode 100644 src/style/components/document.scss diff --git a/src/components/File/index.tsx b/src/components/File/index.tsx index c2c81632..f87abfd4 100644 --- a/src/components/File/index.tsx +++ b/src/components/File/index.tsx @@ -1,24 +1,26 @@ +import './styles.css' + import { FileDefinition } from 'src/types' import { ext, size } from 'src/lib/file' import { titleCase } from 'src/lib/string' export const File: React.SFC = props => ( -
+

{titleCase(props.name)}

{!props.cover?.src ? null : ( -
+ )} -
+
{titleCase(props.name)}
- diff --git a/src/components/File/styles.css b/src/components/File/styles.css new file mode 100644 index 00000000..4c9adafe --- /dev/null +++ b/src/components/File/styles.css @@ -0,0 +1,25 @@ +.file { + display: flex; + flex-direction: column; + align-items: center; + padding: 0; + margin-bottom: var(--size-xl); +} + +.file__image { + margin-bottom: var(--size-m); +} + +.file__image img { + max-width: 100%; + max-height: 100%; + box-shadow: var(--shadow); +} + +.file__image--big { + max-width: 20em; +} + +.file__file-info { + font-size: var(--font-size-second); +} diff --git a/src/style/components/document.scss b/src/style/components/document.scss deleted file mode 100644 index 22cfe83f..00000000 --- a/src/style/components/document.scss +++ /dev/null @@ -1,41 +0,0 @@ -.document { - display: flex; - flex-direction: column; - align-items: center; - padding: 0; - margin-bottom: var(--size-xl); -} - -.document__image{ - //min-width: 10em; - //width: 20em; - //height: 20em; - - margin-bottom: var(--size-m); - - //display: flex; - //justify-content: center; - //align-items: flex-start; - //align-items: center; - - img { - max-width: 100%; - max-height: 100%; - box-shadow: var(--shadow); - } -} - -.document__image--medium{ -} - -.document__image--big{ - max-width: 20em; -} - -.document__file { - -} - -.document__file-info { - font-size: var(--font-size-second); -}