mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
fixed flow appearance
This commit is contained in:
parent
db992a375b
commit
774e254afc
3 changed files with 13 additions and 4 deletions
|
@ -166,6 +166,7 @@
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
// height: auto;
|
// height: auto;
|
||||||
width: auto;
|
width: auto;
|
||||||
|
padding: ($grid_line / 2) $grid_line $grid_line $grid_line;
|
||||||
}
|
}
|
||||||
|
|
||||||
.horizontal > &.has_text {
|
.horizontal > &.has_text {
|
||||||
|
@ -176,9 +177,11 @@
|
||||||
// height: auto;
|
// height: auto;
|
||||||
width: auto;
|
width: auto;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
padding: $grid_line ($grid_line / 2) $grid_line $grid_line;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quadro > &.has_text {
|
.quadro > &.has_text {
|
||||||
|
padding: ($grid_line / 2) ($grid_line / 2) $grid_line $grid_line;
|
||||||
top: auto;
|
top: auto;
|
||||||
height: 50%;
|
height: 50%;
|
||||||
max-width: 50%;
|
max-width: 50%;
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
import React, { FC, HTMLAttributes } from 'react';
|
import React, { FC } from 'react';
|
||||||
import { range } from 'ramda';
|
|
||||||
import * as styles from './styles.scss';
|
import * as styles from './styles.scss';
|
||||||
import { Group } from '~/components/containers/Group';
|
import { Group } from '~/components/containers/Group';
|
||||||
import { INode } from '~/redux/types';
|
import { INode } from '~/redux/types';
|
||||||
import { getURL } from '~/utils/dom';
|
import { getURL } from '~/utils/dom';
|
||||||
|
import { withRouter, RouteComponentProps } from 'react-router';
|
||||||
|
import { URLS } from '~/constants/urls';
|
||||||
|
|
||||||
type IProps = HTMLAttributes<HTMLDivElement> & {
|
type IProps = RouteComponentProps & {
|
||||||
|
title: string;
|
||||||
items: Partial<INode>[];
|
items: Partial<INode>[];
|
||||||
};
|
};
|
||||||
|
|
||||||
const NodeRelated: FC<IProps> = ({ title, items }) => (
|
const NodeRelatedUnconnected: FC<IProps> = ({ title, items, history }) => (
|
||||||
<Group className={styles.wrap}>
|
<Group className={styles.wrap}>
|
||||||
<div className={styles.title}>
|
<div className={styles.title}>
|
||||||
<div className={styles.line} />
|
<div className={styles.line} />
|
||||||
|
@ -22,10 +24,13 @@ const NodeRelated: FC<IProps> = ({ title, items }) => (
|
||||||
className={styles.item}
|
className={styles.item}
|
||||||
key={item.id}
|
key={item.id}
|
||||||
style={{ backgroundImage: `url("${getURL({ url: item.thumbnail })}")` }}
|
style={{ backgroundImage: `url("${getURL({ url: item.thumbnail })}")` }}
|
||||||
|
onClick={() => history.push(URLS.NODE_URL(item.id))}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</Group>
|
</Group>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const NodeRelated = withRouter(NodeRelatedUnconnected);
|
||||||
|
|
||||||
export { NodeRelated };
|
export { NodeRelated };
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
padding-bottom: 100%;
|
padding-bottom: 100%;
|
||||||
border-radius: $cell_radius;
|
border-radius: $cell_radius;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue