fix(striker-ui): add button to upload files

main
Tsu-ba-me 3 years ago
parent 96e7af8949
commit ed723734c4
  1. 22
      striker-ui/components/Files/Files.tsx
  2. 12
      striker-ui/lib/consts/ICON_BUTTON_STYLE.ts

@ -1,11 +1,31 @@
import { Box, IconButton } from '@material-ui/core';
import AddIcon from '@material-ui/icons/Add';
import { makeStyles } from '@material-ui/styles';
import ICON_BUTTON_STYLE from '../../lib/consts/ICON_BUTTON_STYLE';
import { Panel } from '../Panels'; import { Panel } from '../Panels';
import Spinner from '../Spinner'; import Spinner from '../Spinner';
import { HeaderText } from '../Text'; import { HeaderText } from '../Text';
const useStyles = makeStyles(() => ({
addFileButton: ICON_BUTTON_STYLE,
}));
const Files = (): JSX.Element => { const Files = (): JSX.Element => {
const classes = useStyles();
return ( return (
<Panel> <Panel>
<HeaderText text="Files" /> <Box display="flex">
<Box flexGrow={1}>
<HeaderText text="Files" />
</Box>
<Box>
<IconButton className={classes.addFileButton}>
<AddIcon />
</IconButton>
</Box>
</Box>
<Spinner /> <Spinner />
</Panel> </Panel>
); );

@ -0,0 +1,12 @@
import { BLACK, GREY, TEXT } from './DEFAULT_THEME';
const ICON_BUTTON_STYLE: Readonly<Record<string, unknown>> = {
borderRadius: 8,
backgroundColor: GREY,
'&:hover': {
backgroundColor: TEXT,
},
color: BLACK,
};
export default ICON_BUTTON_STYLE;
Loading…
Cancel
Save