feat: show call participants in room list (Discord-style)
Docker / Docker Buildx (push) Has been cancelled
Build Debian package / Build package (release) Has been cancelled
Build and Deploy / prepare (release) Has been cancelled
Deploy release / Deploy to Cloudflare Pages (release) Has been cancelled
Build and Deploy / Trigger Pro pipeline (release) Has been cancelled
Build and Deploy / Windows arm64 (release) Has been cancelled
Build and Deploy / Windows x64 (release) Has been cancelled
Build and Deploy / macOS (release) Has been cancelled
Build and Deploy / Linux amd64 (sqlcipher static) (release) Has been cancelled
Build and Deploy / Linux arm64 (sqlcipher static) (release) Has been cancelled
Build and Deploy / ${{ needs.prepare.outputs.deploy == 'true' && 'Deploy' || 'Deploy (dry-run)' }} (release) Has been cancelled
Build and Deploy / Deploy builds to ESS (release) Has been cancelled
Docker / Docker Buildx (push) Has been cancelled
Build Debian package / Build package (release) Has been cancelled
Build and Deploy / prepare (release) Has been cancelled
Deploy release / Deploy to Cloudflare Pages (release) Has been cancelled
Build and Deploy / Trigger Pro pipeline (release) Has been cancelled
Build and Deploy / Windows arm64 (release) Has been cancelled
Build and Deploy / Windows x64 (release) Has been cancelled
Build and Deploy / macOS (release) Has been cancelled
Build and Deploy / Linux amd64 (sqlcipher static) (release) Has been cancelled
Build and Deploy / Linux arm64 (sqlcipher static) (release) Has been cancelled
Build and Deploy / ${{ needs.prepare.outputs.deploy == 'true' && 'Deploy' || 'Deploy (dry-run)' }} (release) Has been cancelled
Build and Deploy / Deploy builds to ESS (release) Has been cancelled
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
# Icons
|
||||
|
||||
Icons are loaded using [@svgr/webpack](https://www.npmjs.com/package/@svgr/webpack).
|
||||
This is configured in [element-web](https://github.com/vector-im/element-web/blob/develop/webpack.config.js#L458).
|
||||
|
||||
Each `.svg` exports a `ReactComponent` at the named export `Icon`.
|
||||
Icons have `role="presentation"` and `aria-hidden` automatically applied. These can be overriden by passing props to the icon component.
|
||||
|
||||
SVG file recommendations:
|
||||
|
||||
- Colours should not be defined absolutely. Use `currentColor` instead.
|
||||
- SVG files should be taken from the design compound as they are. Some icons contain special padding.
|
||||
This means that there should be icons for each size, e.g. warning-16px and warning-32px.
|
||||
|
||||
Example usage:
|
||||
|
||||
```
|
||||
import { Icon as FavoriteIcon } from 'res/img/element-icons/favorite.svg';
|
||||
|
||||
const MyComponent = () => {
|
||||
return <>
|
||||
<FavoriteIcon className="mx_Icon mx_Icon_16">
|
||||
</>;
|
||||
}
|
||||
```
|
||||
|
||||
If possible, use the icon classes from [here](https://github.com/element-hq/element-web/blob/develop/apps/web/res/css/compound/_Icon.pcss).
|
||||
|
||||
## Custom styling
|
||||
|
||||
Icon components are svg elements and may be custom styled as usual.
|
||||
|
||||
`_MyComponents.pcss`:
|
||||
|
||||
```css
|
||||
.mx_MyComponent-icon {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
|
||||
* {
|
||||
fill: $accent;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`MyComponent.tsx`:
|
||||
|
||||
```typescript
|
||||
import { Icon as FavoriteIcon } from 'res/img/element-icons/favorite.svg';
|
||||
|
||||
const MyComponent = () => {
|
||||
return <>
|
||||
<FavoriteIcon className="mx_MyComponent-icon" role="img" aria-hidden="false">
|
||||
</>;
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user