Skip to content

Commit 9d5a9bd

Browse files
committed
feat(explorer): make epoch settings component layout horizontal
1 parent c2828b2 commit 9d5a9bd

File tree

1 file changed

+26
-16
lines changed
  • mithril-explorer/src/components/EpochSettings

1 file changed

+26
-16
lines changed

mithril-explorer/src/components/EpochSettings/index.js

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useEffect, useState } from "react";
2-
import { Card, ButtonGroup, DropdownButton } from "react-bootstrap";
2+
import {Card, Row, Col, Stack, Container} from "react-bootstrap";
33
import { useSelector } from "react-redux";
44
import LinkButton from "#/LinkButton";
55
import RawJsonButton from "#/RawJsonButton";
@@ -66,23 +66,33 @@ export default function EpochSettings() {
6666

6767
<Card>
6868
<Card.Body>
69-
<Card.Title>Current Epoch</Card.Title>
70-
<div className="mb-2 ps-3">{epochSettings.epoch}</div>
71-
<Card.Title>Protocol Parameters</Card.Title>
72-
<ProtocolParameters className="mb-2" protocolParameters={epochSettings.protocol} />
73-
<Card.Title>Next Protocol Parameters</Card.Title>
74-
<ProtocolParameters protocolParameters={epochSettings.next_protocol} />
69+
<Container>
70+
<Row>
71+
<Col xs={12} md="auto">
72+
<h5>Current Epoch</h5>
73+
<div className="mb-2 ps-3">{epochSettings.epoch}</div>
74+
</Col>
75+
<Col xs={12} md="auto">
76+
<h5>Protocol Parameters</h5>
77+
<ProtocolParameters className="mb-2" protocolParameters={epochSettings.protocol}/>
78+
</Col>
79+
<Col xs={12} md="auto">
80+
<h5>Next Protocol Parameters</h5>
81+
<ProtocolParameters protocolParameters={epochSettings.next_protocol}/>
82+
</Col>
83+
</Row>
84+
</Container>
7585
</Card.Body>
7686
{registrationPageUrl && inOutRegistrationsPageUrl && (
77-
<Card.Footer className="text-center">
78-
<ButtonGroup>
79-
<LinkButton href={registrationPageUrl}>Registered Signers</LinkButton>
80-
<DropdownButton as={ButtonGroup}>
81-
<LinkButton href={inOutRegistrationsPageUrl} variant="light">
82-
In/Out Registrations
83-
</LinkButton>
84-
</DropdownButton>
85-
</ButtonGroup>
87+
<Card.Footer>
88+
<Stack direction="horizontal" gap={1} className="justify-content-md-end align-items-stretch justify-content-sm-center">
89+
<LinkButton href={registrationPageUrl}>
90+
<i className="bi bi-pen"></i> Registered Signers
91+
</LinkButton>
92+
<LinkButton href={inOutRegistrationsPageUrl} className="">
93+
<i className="bi bi-arrow-left-right translate-middle-y"></i> In/Out Registrations
94+
</LinkButton>
95+
</Stack>
8696
</Card.Footer>
8797
)}
8898
</Card>

0 commit comments

Comments
 (0)