update some markdown styles, fix avatars issue

pull/69/head
dperolio 3 years ago
parent 7b96267443
commit 274b3e35ba
No known key found for this signature in database
GPG Key ID: 3E9BBAA710D3DDCE

@ -1,9 +1,3 @@
/**
* Applies attributes to user avatars.
* @module Avatar
* @memberof Builtin.Attributes.Components
*/
import { forceUpdateElement } from '@vizality/util/react';
import { patch, unpatch } from '@vizality/patcher';
import { getModule } from '@vizality/webpack';
@ -11,6 +5,11 @@ import React from 'react';
export const labels = [ 'Components', 'Avatar' ];
/**
* Applies attributes to user avatars.
* @module Avatar
* @memberof Builtin.Attributes.Components
*/
export default builtin => {
const AvatarModule = getModule('AnimatedAvatar');
const Avatar = AvatarModule?.default;
@ -18,7 +17,7 @@ export default builtin => {
try {
const avatar = args[0]?.src;
if (avatar?.includes('/avatars')) {
[ , res.props['vz-user-id'] ] = avatar.match(/\/avatars\/(\d+)/);
[ , res.props['vz-user-id'] ] = avatar.match(/\/(?:avatars|users)\/(\d+)/);
}
} catch (err) {
return builtin.error(builtin._labels.concat(labels), err);

@ -2,6 +2,14 @@ import Fuse from 'fuse.js';
import { flattenArray } from './Array';
/**
*
* @see {@link https://github.com/enkidevs/react-search-input}
* @param {*} term
* @param {*} keys
* @param {*} options
* @returns
*/
export const createFilter = (term, keys, options = {}) => {
function getValuesForKey (key, item) {
const keys = key.split('.');

@ -187,6 +187,12 @@
margin-top: 0;
margin-bottom: 16px;
}
&-blockquote > :last-child {
margin-bottom: 0;
}
&-blockquote > :first-child {
margin-top: 0;
}
&-content-loading {
@include vz.size(100%);
display: flex;

@ -1300,6 +1300,12 @@
margin-top: 0;
margin-bottom: 16px;
}
.vz-markdown-blockquote > :last-child {
margin-bottom: 0;
}
.vz-markdown-blockquote > :first-child {
margin-top: 0;
}
.vz-markdown-content-loading {
width: 100%;
height: 100%;

Loading…
Cancel
Save