New "browse" UI
Also, separated out browse, ?meta, and ?module request handlers. Fixes #82
This commit is contained in:
24
modules/client/browse/Icons.js
Normal file
24
modules/client/browse/Icons.js
Normal file
@ -0,0 +1,24 @@
|
||||
/** @jsx jsx */
|
||||
import { jsx } from '@emotion/core';
|
||||
import { GoFileDirectory, GoFile } from 'react-icons/go';
|
||||
import { FaTwitter, FaGithub } from 'react-icons/fa';
|
||||
|
||||
function createIcon(Type, { css, ...rest }) {
|
||||
return <Type css={{ ...css, verticalAlign: 'text-bottom' }} {...rest} />;
|
||||
}
|
||||
|
||||
export function DirectoryIcon(props) {
|
||||
return createIcon(GoFileDirectory, props);
|
||||
}
|
||||
|
||||
export function CodeFileIcon(props) {
|
||||
return createIcon(GoFile, props);
|
||||
}
|
||||
|
||||
export function TwitterIcon(props) {
|
||||
return createIcon(FaTwitter, props);
|
||||
}
|
||||
|
||||
export function GitHubIcon(props) {
|
||||
return createIcon(FaGithub, props);
|
||||
}
|
Reference in New Issue
Block a user