Dwayne Harris
5 years ago
9 changed files with 98 additions and 31 deletions
-
34package-lock.json
-
4package.json
-
15postcss-normalize.d.ts
-
24postcss-preset-env.d.ts
-
1src/components/app-list-item.tsx
-
26src/components/group-list-item.tsx
-
15src/components/pages/groups.tsx
-
8src/styles/app.css
-
2webpack.config.ts
@ -0,0 +1,15 @@ |
|||||
|
declare module 'postcss-normalize' { |
||||
|
import { |
||||
|
plugin, Plugin, ParserInput, |
||||
|
Result, LazyResult, Root, ProcessOptions |
||||
|
} from 'postcss' |
||||
|
|
||||
|
interface PluginOptions { |
||||
|
allowDuplicates?: boolean |
||||
|
forceImport?: string | boolean |
||||
|
browsers?: string |
||||
|
} |
||||
|
|
||||
|
const PostcssNormalize: Plugin<PluginOptions> |
||||
|
export default PostcssNormalize |
||||
|
} |
@ -1,19 +1,27 @@ |
|||||
import React, { FC } from 'react' |
import React, { FC } from 'react' |
||||
import { Link } from 'react-router-dom' |
import { Link } from 'react-router-dom' |
||||
|
|
||||
|
import { useTheme, useConfig } from 'src/hooks' |
||||
import { Group } from 'src/types' |
import { Group } from 'src/types' |
||||
|
|
||||
interface Props { |
interface Props { |
||||
group: Group |
group: Group |
||||
} |
} |
||||
|
|
||||
const GroupListItem: FC<Props> = ({ group }) => ( |
|
||||
<div className="group-list-item"> |
|
||||
<Link to={`/c/${group.id}/register`} className="title has-text-primary">{group.name}</Link> |
|
||||
|
|
||||
{group.about && <p>{group.about}</p>} |
|
||||
<br /><br /> |
|
||||
</div> |
|
||||
) |
|
||||
|
const GroupListItem: FC<Props> = ({ group }) => { |
||||
|
const theme = useTheme() |
||||
|
const config = useConfig() |
||||
|
|
||||
|
return ( |
||||
|
<div className="group-list-item" style={{ backgroundColor: theme.backgroundPrimary, borderColor: theme.backgroundSecondary }}> |
||||
|
{group.imageUrl && |
||||
|
<div className="image"> |
||||
|
<img src={`${config.blobUrl}${group.imageUrl}`} /> |
||||
|
</div> |
||||
|
} |
||||
|
<Link to={`/c/${group.id}/register`} style={{ color: theme.primary }}>{group.name}</Link> |
||||
|
{group.about && <p style={{ color: theme.text }}>{group.about}</p>} |
||||
|
</div> |
||||
|
) |
||||
|
} |
||||
|
|
||||
export default GroupListItem |
export default GroupListItem |
Write
Preview
Loading…
Cancel
Save
Reference in new issue