Skip to content
Snippets Groups Projects
Commit f480f287 authored by Remco Tukker's avatar Remco Tukker
Browse files

style collapsable box buttons

parent aac810dc
No related branches found
No related tags found
1 merge request!38Feature/comp 194 fix landing pages layout
This diff is collapsed.
import React, { useState } from 'react'; import React, { useState } from 'react';
import { Col, Row } from 'react-bootstrap'; import { Col, Row } from 'react-bootstrap';
import { GrAdd, GrSubtract } from 'react-icons/gr'; import { AiOutlineClose, AiOutlinePlus } from 'react-icons/ai';
interface CollapsibleBoxProps { interface CollapsibleBoxProps {
title: string; title: string;
...@@ -12,15 +12,17 @@ const CollapsibleBox: React.FC<CollapsibleBoxProps> = ({ title, children, startC ...@@ -12,15 +12,17 @@ const CollapsibleBox: React.FC<CollapsibleBoxProps> = ({ title, children, startC
const [isCollapsed, setIsCollapsed] = useState(!!startCollapsed); const [isCollapsed, setIsCollapsed] = useState(!!startCollapsed);
return ( return (
<div className='collapsible-box'> <div className='collapsible-box p-0'>
<Row> <Row>
<Col> <Col>
<h1 className="bold-caps-16pt dark-teal">{title}</h1> <h1 className="bold-caps-16pt dark-teal pt-3 ps-3">{title}</h1>
</Col> </Col>
<Col align="right"> <Col className='flex-grow-0 flex-shrink-0'>
<button className="expand-collapse-btn" onClick={() => setIsCollapsed(!isCollapsed)}> <div className="toggle-btn p-2" onClick={() => setIsCollapsed(!isCollapsed)}>
{isCollapsed ? <GrAdd/> : <GrSubtract />} {isCollapsed ?
</button> <AiOutlinePlus style={{ color: 'white', paddingBottom: "3px", marginTop: "3px", marginLeft: "3px", scale: "1.3"}} /> :
<AiOutlineClose style={{ color: 'white', paddingBottom: "3px", marginTop: "3px", marginLeft: "3px", scale: "1.3"}} />}
</div>
</Col> </Col>
</Row> </Row>
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
.collapsible-box { .collapsible-box {
margin: 1rem; margin: 1rem;
border: 2px solid $yellow; border: 2px solid $yellow-orange;
padding: 10px; padding: 10px;
width: 80rem; width: 80rem;
max-width: 50vw; max-width: 50vw;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment