mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
changed horizontal editor
This commit is contained in:
parent
393813ce4e
commit
4c20da6151
3 changed files with 38 additions and 47 deletions
|
@ -1,10 +1,10 @@
|
||||||
import * as React from 'react';
|
import * as React from "react";
|
||||||
import { connect } from 'react-redux';
|
import { connect } from "react-redux";
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from "redux";
|
||||||
import { hot } from 'react-hot-loader';
|
import { hot } from "react-hot-loader";
|
||||||
import { ConnectedRouter } from "connected-react-router";
|
import { ConnectedRouter } from "connected-react-router";
|
||||||
import { history } from "~/redux/store";
|
import { history } from "~/redux/store";
|
||||||
import { NavLink, Switch, Route, Redirect } from 'react-router-dom';
|
import { NavLink, Switch, Route, Redirect } from "react-router-dom";
|
||||||
import { FlowLayout } from "~/containers/flow/FlowLayout";
|
import { FlowLayout } from "~/containers/flow/FlowLayout";
|
||||||
import { LoginLayout } from "~/containers/login/LoginLayout";
|
import { LoginLayout } from "~/containers/login/LoginLayout";
|
||||||
import { MainLayout } from "~/containers/main/MainLayout";
|
import { MainLayout } from "~/containers/main/MainLayout";
|
||||||
|
@ -27,6 +27,7 @@ class Component extends React.Component<IAppProps, IAppState> {
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route path={URLS.EXAMPLES.IMAGE} component={ImageExample} />
|
<Route path={URLS.EXAMPLES.IMAGE} component={ImageExample} />
|
||||||
<Route path={URLS.EXAMPLES.EDITOR} component={EditorExample} />
|
<Route path={URLS.EXAMPLES.EDITOR} component={EditorExample} />
|
||||||
|
<Route path="/examples/horizontal" component={HorizontalExample} />
|
||||||
<Route exact path={URLS.BASE} component={FlowLayout} />
|
<Route exact path={URLS.BASE} component={FlowLayout} />
|
||||||
|
|
||||||
<Route path={URLS.AUTH.LOGIN} component={LoginLayout} />
|
<Route path={URLS.AUTH.LOGIN} component={LoginLayout} />
|
||||||
|
@ -40,6 +41,9 @@ class Component extends React.Component<IAppProps, IAppState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapStateToProps = (state, props) => ({});
|
const mapStateToProps = (state, props) => ({});
|
||||||
const mapDispatchToProps = (dispatch) => bindActionCreators({}, dispatch);
|
const mapDispatchToProps = dispatch => bindActionCreators({}, dispatch);
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(hot(module)(Component));
|
export default connect(
|
||||||
|
mapStateToProps,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(hot(module)(Component));
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { FC } from 'react';
|
import React, { FC } from "react";
|
||||||
import { Card } from "~/components/containers/Card";
|
import { Card } from "~/components/containers/Card";
|
||||||
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 { Padder } from "~/components/containers/Padder";
|
import { Padder } from "~/components/containers/Padder";
|
||||||
import { CellGrid } from "~/components/containers/CellGrid";
|
import { CellGrid } from "~/components/containers/CellGrid";
|
||||||
|
@ -18,8 +18,8 @@ const HorizontalExample: FC<IProps> = () => (
|
||||||
<Card className={styles.wrap} seamless>
|
<Card className={styles.wrap} seamless>
|
||||||
<Group className={styles.group} seamless>
|
<Group className={styles.group} seamless>
|
||||||
<div className={styles.editor}>
|
<div className={styles.editor}>
|
||||||
<Panel className={classNames(styles.editor_panel, styles.editor_image_panel)}>
|
<Scroll>
|
||||||
<Scroll autoHeight autoHeightMax={500}>
|
<Padder>
|
||||||
<CellGrid className={styles.editor_image_container} size={200}>
|
<CellGrid className={styles.editor_image_container} size={200}>
|
||||||
<div className={styles.editor_image} />
|
<div className={styles.editor_image} />
|
||||||
<div className={styles.editor_image} />
|
<div className={styles.editor_image} />
|
||||||
|
@ -29,46 +29,33 @@ const HorizontalExample: FC<IProps> = () => (
|
||||||
<div className={styles.editor_image} />
|
<div className={styles.editor_image} />
|
||||||
<div className={styles.editor_image} />
|
<div className={styles.editor_image} />
|
||||||
<div className={styles.editor_image} />
|
<div className={styles.editor_image} />
|
||||||
<div className={styles.editor_image} />
|
|
||||||
<div className={styles.editor_image} />
|
|
||||||
<div className={styles.editor_image} />
|
|
||||||
<div className={styles.editor_image} />
|
|
||||||
<div className={styles.editor_image} />
|
|
||||||
<div className={styles.editor_image} />
|
|
||||||
</CellGrid>
|
</CellGrid>
|
||||||
|
</Padder>
|
||||||
</Scroll>
|
</Scroll>
|
||||||
</Panel>
|
|
||||||
<Panel>
|
|
||||||
<InputText title="Заголовок" />
|
|
||||||
</Panel>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.panel}>
|
<div className={styles.panel}>
|
||||||
<Padder>
|
<Padder>
|
||||||
<Grid columns="1fr 1fr 1fr">
|
<Grid columns="2fr 1fr 1fr">
|
||||||
<Group>
|
|
||||||
<Card className={styles.feature_card}>Layout setup</Card>
|
|
||||||
|
|
||||||
<Card className={styles.feature_card}>Cover changer</Card>
|
|
||||||
|
|
||||||
<Card className={styles.feature_card}>Track</Card>
|
|
||||||
</Group>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
<Group>
|
||||||
|
<InputText title="Название" />
|
||||||
|
|
||||||
<Tags
|
<Tags
|
||||||
tags={[
|
tags={[
|
||||||
{ title: 'Избранный', feature: 'red' },
|
{ title: "Избранный", feature: "red" },
|
||||||
{ title: 'Плейлист', feature: 'green' },
|
{ title: "Плейлист", feature: "green" },
|
||||||
{ title: 'Просто' },
|
{ title: "Просто" },
|
||||||
{ title: '+ фото', feature: 'black' },
|
{ title: "+ фото", feature: "black" },
|
||||||
{ title: '+ с музыкой', feature: 'black' },
|
{ title: "+ с музыкой", feature: "black" }
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
</Group>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div />
|
||||||
<Button>Submit?</Button>
|
|
||||||
</div>
|
<div />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Padder>
|
</Padder>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
background: $editor_bg;
|
background: $editor_bg;
|
||||||
//flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.group {
|
.group {
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor {
|
.editor {
|
||||||
//flex: 2;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue