Add some style
This commit is contained in:
@ -18,5 +18,6 @@
|
|||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": "preact"
|
"extends": "preact"
|
||||||
}
|
},
|
||||||
|
"packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { render } from 'preact';
|
import { render } from 'preact';
|
||||||
import { useState, useEffect } from 'preact/hooks';
|
import { useState, useEffect } from 'preact/hooks';
|
||||||
|
import './style.css'
|
||||||
const EVENTS = 'https://api.kommunity.com/api/v1/faith-in-tech/events?&page=1'
|
const EVENTS = 'https://api.kommunity.com/api/v1/faith-in-tech/events?&page=1'
|
||||||
function Example() {
|
function Example() {
|
||||||
const [items, setItems] = useState([]);
|
const [items, setItems] = useState([]);
|
||||||
@ -35,11 +35,11 @@ function Example() {
|
|||||||
|
|
||||||
function UserList({ users, slug }) {
|
function UserList({ users, slug }) {
|
||||||
return (
|
return (
|
||||||
<ul class="user-items">
|
<div class="user-items">
|
||||||
{users.map((user) => (
|
{users.map((user) => (
|
||||||
<li><a href={`/faith-in-tech/events/${slug}/attendees`} class=""><img src={user.avatar} class="mini-avatar" /></a></li>
|
<a href={`/faith-in-tech/events/${slug}/attendees`} class=""><img src={user.avatar} class="mini-avatar" /></a>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,3 +91,16 @@ section {
|
|||||||
margin-left: -15px;
|
margin-left: -15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.user-items {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
img.mini-avatar {
|
||||||
|
height: 40px;
|
||||||
|
width: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-left: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.mini-avatar:first {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
Reference in New Issue
Block a user