Skip to content

Commit 65cc238

Browse files
authored
Merge pull request #216 from arangodb/fix/style-refactoring
Grouping style elements in 1 place
2 parents d229457 + 6f9dcd0 commit 65cc238

File tree

12 files changed

+88
-156
lines changed

12 files changed

+88
-156
lines changed

dashboard/assets.go

Lines changed: 46 additions & 46 deletions
Large diffs are not rendered by default.

dashboard/src/deployment/DeploymentDetails.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
import { Loader } from 'semantic-ui-react';
22
import React, { Component } from 'react';
33
import ReactTimeout from 'react-timeout';
4-
import styled from 'react-emotion';
54

5+
import { LoaderBox } from '../style/style';
66
import { withAuth } from '../auth/Auth.js';
77
import api, { isUnauthorized } from '../api/api';
88
import Loading from '../util/Loading';
99
import MemberList from './MemberList';
1010

11-
const LoaderBox = styled('span')`
12-
float: right;
13-
width: 0;
14-
padding-right: 1em;
15-
margin-right: 1em;
16-
margin-top: 1em;
17-
max-width: 0;
18-
display: inline-block;
19-
`;
20-
2111
const MemberGroupsView = ({memberGroups, namespace}) => (
2212
<div>
2313
{memberGroups.map((item) => <MemberList

dashboard/src/deployment/DeploymentList.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,13 @@ import { Icon, Loader, Popup, Table } from 'semantic-ui-react';
22
import { Link } from "react-router-dom";
33
import React, { Component } from 'react';
44
import ReactTimeout from 'react-timeout';
5-
import styled from 'react-emotion';
65

6+
import { LoaderBoxForTable as LoaderBox } from '../style/style';
77
import { withAuth } from '../auth/Auth';
88
import api, { isUnauthorized } from '../api/api';
99
import CommandInstruction from '../util/CommandInstruction';
1010
import Loading from '../util/Loading';
1111

12-
const LoaderBox = styled('span')`
13-
float: right;
14-
width: 0;
15-
padding-right: 1em;
16-
max-width: 0;
17-
display: inline-block;
18-
`;
19-
2012
const HeaderView = ({loading}) => (
2113
<Table.Header>
2214
<Table.Row>

dashboard/src/deployment/DeploymentOperator.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
11
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
22
import { Header, Menu, Message, Segment } from 'semantic-ui-react';
33
import React, { Component } from 'react';
4-
import styled from 'react-emotion';
54

5+
import { StyledMenu, StyledContentBox } from '../style/style';
66
import DeploymentDetails from './DeploymentDetails';
77
import DeploymentList from './DeploymentList';
88
import LogoutContext from '../auth/LogoutContext';
99

10-
const StyledMenu = styled(Menu)`
11-
width: 15rem !important;
12-
@media (max-width: 768px) {
13-
width: 10rem !important;
14-
}
15-
`;
16-
17-
const StyledContentBox = styled('div')`
18-
margin-left: 15rem;
19-
@media (max-width: 768px) {
20-
margin-left: 10rem;
21-
}
22-
`;
23-
2410
const ListView = () => (
2511
<div>
2612
<Header dividing>

dashboard/src/logo.svg

Lines changed: 0 additions & 7 deletions
This file was deleted.

dashboard/src/replication/DeploymentReplicationDetails.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
import { Header, Loader, Segment } from 'semantic-ui-react';
22
import React, { Component } from 'react';
33
import ReactTimeout from 'react-timeout';
4-
import styled from 'react-emotion';
54

65
import { Field, FieldContent as FC, FieldLabel as FL } from '../style/style';
6+
import { LoaderBox } from '../style/style';
77
import { withAuth } from '../auth/Auth';
88
import api, { isUnauthorized } from '../api/api';
99
import Loading from '../util/Loading';
1010

11-
const LoaderBox = styled('span')`
12-
float: right;
13-
width: 0;
14-
padding-right: 1em;
15-
margin-right: 1em;
16-
margin-top: 1em;
17-
max-width: 0;
18-
display: inline-block;
19-
`;
20-
2111
const EndpointView = ({title, deploymentName, masterEndpoint, authKeyfileSecretName, authUserSecretName, tlsCACert, tlsCACertSecretName}) => (
2212
<Segment>
2313
<Header>{title}</Header>

dashboard/src/replication/DeploymentReplicationList.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,13 @@ import { Icon, Loader, Popup, Table } from 'semantic-ui-react';
22
import { Link } from "react-router-dom";
33
import React, { Component } from 'react';
44
import ReactTimeout from 'react-timeout';
5-
import styled from 'react-emotion';
65

6+
import { LoaderBoxForTable as LoaderBox } from '../style/style';
77
import { withAuth } from '../auth/Auth';
88
import api, { isUnauthorized } from '../api/api';
99
import CommandInstruction from '../util/CommandInstruction';
1010
import Loading from '../util/Loading';
1111

12-
const LoaderBox = styled('span')`
13-
float: right;
14-
width: 0;
15-
padding-right: 1em;
16-
max-width: 0;
17-
display: inline-block;
18-
`;
19-
2012
const HeaderView = ({loading}) => (
2113
<Table.Header>
2214
<Table.Row>

dashboard/src/replication/DeploymentReplicationOperator.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
11
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
22
import { Header, Menu, Message, Segment } from 'semantic-ui-react';
33
import React, { Component } from 'react';
4-
import styled from 'react-emotion';
54

5+
import { StyledMenu, StyledContentBox } from '../style/style';
66
import DeploymentReplicationDetails from './DeploymentReplicationDetails';
77
import DeploymentReplicationList from './DeploymentReplicationList';
88
import LogoutContext from '../auth/LogoutContext';
99

10-
const StyledMenu = styled(Menu)`
11-
width: 15rem !important;
12-
@media (max-width: 768px) {
13-
width: 10rem !important;
14-
}
15-
`;
16-
17-
const StyledContentBox = styled('div')`
18-
margin-left: 15rem;
19-
@media (max-width: 768px) {
20-
margin-left: 10rem;
21-
}
22-
`;
23-
2410
const ListView = () => (
2511
<div>
2612
<Header dividing>

dashboard/src/storage/StorageList.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
import { Loader, Table } from 'semantic-ui-react';
22
import React, { Component } from 'react';
33
import ReactTimeout from 'react-timeout';
4-
import styled from 'react-emotion';
54

5+
import { LoaderBoxForTable as LoaderBox } from '../style/style';
66
import { withAuth } from '../auth/Auth';
77
import api, { isUnauthorized } from '../api/api';
88
import Loading from '../util/Loading';
99
import StorageRow from './StorageRow';
1010

11-
const LoaderBox = styled('span')`
12-
float: right;
13-
width: 0;
14-
padding-right: 1em;
15-
max-width: 0;
16-
display: inline-block;
17-
`;
18-
1911
const HeaderView = ({loading}) => (
2012
<Table.Header>
2113
<Table.Row>

dashboard/src/storage/StorageOperator.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,10 @@
11
import { Header, Menu, Message, Segment } from 'semantic-ui-react';
22
import React, { Component } from 'react';
3-
import styled from 'react-emotion';
43

4+
import { StyledMenu, StyledContentBox } from '../style/style';
55
import LogoutContext from '../auth/LogoutContext';
66
import StorageList from './StorageList';
77

8-
const StyledMenu = styled(Menu)`
9-
width: 15rem !important;
10-
@media (max-width: 768px) {
11-
width: 10rem !important;
12-
}
13-
`;
14-
15-
const StyledContentBox = styled('div')`
16-
margin-left: 15rem;
17-
@media (max-width: 768px) {
18-
margin-left: 10rem;
19-
}
20-
`;
21-
228
const ListView = () => (
239
<div>
2410
<Header dividing>

0 commit comments

Comments
 (0)