diff options
author | 2021-08-16 21:22:32 +0200 | |
---|---|---|
committer | 2021-08-16 21:24:42 +0200 | |
commit | eb28244fc8f98e28728c7b3f951e102b9cc56590 (patch) | |
tree | 76237e414671730371f87c8e263a18c2d2e8c17f /apps/Notes/components/List.js | |
parent | b43d34c0136552cd2d83258fb5523bb873177908 (diff) | |
download | my_apps-eb28244fc8f98e28728c7b3f951e102b9cc56590.tar.gz my_apps-eb28244fc8f98e28728c7b3f951e102b9cc56590.tar.bz2 my_apps-eb28244fc8f98e28728c7b3f951e102b9cc56590.zip |
styles moved to scss
Diffstat (limited to 'apps/Notes/components/List.js')
-rw-r--r-- | apps/Notes/components/List.js | 45 |
1 files changed, 5 insertions, 40 deletions
diff --git a/apps/Notes/components/List.js b/apps/Notes/components/List.js index ec19639..b9fde02 100644 --- a/apps/Notes/components/List.js +++ b/apps/Notes/components/List.js @@ -1,8 +1,8 @@ +import styles from '../Notes.module.scss' import React, {useState, useEffect, useRef} from 'react' import useUser from 'lib/useUser' import useNotes from '../hooks/useNotes' import useSort from '../hooks/useSort' -import fetchJson from 'lib/fetchJson' import {Layout} from 'components' import ListItem from './ListItem' import Actions from './Actions' @@ -33,12 +33,12 @@ const List = () => { <div onClick={() => setAction('import')}>Import</div> <div onClick={() => {}}>Export</div> </div> - <table className="list"> + <table className={styles.notesList}> <thead> <tr> - <th className='list__title' onClick={() => sortBy(1)}>Title {sortedBy(1)}</th> - <th className='list__date' onClick={() => sortBy(2)}>Created {sortedBy(2)}</th> - <th className='list__date' onClick={() => sortBy(3)}>Modified {sortedBy(3)}</th> + <th onClick={() => sortBy(1)}>Title {sortedBy(1)}</th> + <th onClick={() => sortBy(2)}>Created {sortedBy(2)}</th> + <th onClick={() => sortBy(3)}>Modified {sortedBy(3)}</th> </tr> </thead> <tbody> @@ -68,41 +68,6 @@ const List = () => { /> ) } - <style jsx>{` - table { - display: block; - overflow: auto; - width: 100%; - table-layout: fixed; - word-wrap: break-word; - height: 100%; - margin-top: -1em; - padding-top: 1em; - } - - tbody, thead { - display: block; - } - - tr { - display: flex; - padding: 0 .5em; - } - - th { - font-weight: 600; - text-align: left; - min-width: 10em; - white-space: nowrap; - padding-bottom: .5em; - cursor: pointer; - line-height: 1.1em; - } - - th:first-of-type { - width: 99%; - } - `}</style> </> ) } |