mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed grid
This commit is contained in:
parent
b45ecadd20
commit
ba614a115d
4 changed files with 25 additions and 7 deletions
|
@ -18,10 +18,10 @@ const Cell: FC<IProps> = ({
|
||||||
is_hero,
|
is_hero,
|
||||||
}) => (
|
}) => (
|
||||||
<div
|
<div
|
||||||
className={classNames(styles.cell, { is_hero })}
|
className={classNames(styles.cell, `vert-${height}`, `hor-${width}`)}
|
||||||
style={{
|
style={{
|
||||||
gridRowEnd: `span ${height}`,
|
// gridRowEnd: `span ${height}`,
|
||||||
gridColumnEnd: `span ${width}`,
|
// gridColumnEnd: `span ${width}`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{ title && <div className={styles.title}>{title}</div> }
|
{ title && <div className={styles.title}>{title}</div> }
|
||||||
|
|
|
@ -32,3 +32,21 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:global {
|
||||||
|
.vert-1 {
|
||||||
|
grid-row-end: span 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vert-2 {
|
||||||
|
grid-row-end: span 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hor-1 {
|
||||||
|
grid-column-end: span 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hor-2 {
|
||||||
|
grid-column-end: span 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ export const TestGrid = () => (
|
||||||
<div className={styles.grid_test}>
|
<div className={styles.grid_test}>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
gridRow: '2 / 4',
|
gridRow: '1 / 3',
|
||||||
gridColumn: '-2 / -1',
|
gridColumn: '-2 / -1',
|
||||||
background: '#090909',
|
background: '#090909',
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
|
@ -34,8 +34,8 @@ export const TestGrid = () => (
|
||||||
|
|
||||||
{range(1, 20).map(el => (
|
{range(1, 20).map(el => (
|
||||||
<Cell
|
<Cell
|
||||||
width={Math.floor(Math.random() * 3)}
|
width={Math.floor(Math.random() * 2 + 1)}
|
||||||
height={Math.floor(Math.random() * 3)}
|
height={Math.floor(Math.random() * 2 + 1)}
|
||||||
title={`Cell ${el}`}
|
title={`Cell ${el}`}
|
||||||
key={el}
|
key={el}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -60,7 +60,7 @@ const LoginDialogUnconnected: FC<IProps> = ({
|
||||||
<div />
|
<div />
|
||||||
<div />
|
<div />
|
||||||
|
|
||||||
<InputText title="Логин" handler={setUserName} value={username} />
|
<InputText title="Логин" handler={setUserName} value={username} autoFocus />
|
||||||
<InputText title="Пароль" handler={setPassword} value={password} />
|
<InputText title="Пароль" handler={setPassword} value={password} />
|
||||||
</Group>
|
</Group>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue