fk-react-ui-components
Version:
Step 1 : Create a file in [ Seeds / Plants / Trees ] <br> Step 2 : It should export an Object with component name and story Component [Refer other components] <br> Step 3 : Story Component should return a react component <br> Step 3 : Created file should
112 lines (105 loc) • 2.81 kB
JavaScript
import React from "react";
import styled from "styled-components";
import { colors } from "../../colorCodes";
export const TimelineContainer = styled.div`
font-family: "Riona Sans";
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
.milestone{
padding: 0;
position: relative;
}
.progress{
overflow: hidden;
margin-bottom: 12px;
}
.dashed{
height: 1px;
border:none;
background: ${"linear-gradient(to right, transparent 50%, " + colors.lineBorder + " 50%), linear-gradient(to right, " + colors.whiteText + ", " + colors.whiteText + ")"};
background-size: 14px 1px, 100% 1px;
}
.solid{
height:0px;
}
.milestone .progress{
position: relative;
box-shadow: none;
border-radius: 0px;
margin:12px 0;
}
.milestone:first-child .progress {
left:50%;
width:50%;
}
.milestone:last-child .progress {
width:50%;
}
.progress-bar{
width: 0px;
float: left;
height: 100%;
color:${colors.whiteText};
text-align:center;
}
.milestone .progress-bar{
width: 0px;
box-shadow: none;
}
.milestone.complete .progress-bar {
width: 100%;
}
.milestone.active .progress-bar {
width: 50%;
}
.milestone:first-child.active > .progress-bar {
width: 0%;
}
.milestone:last-child.active > .progress-bar {
width: 100%;
}
`;
export const TlHeader = styled.div`
position: relative;
color: ${colors.darkGrey};
text-align:center;
vertical-align:middle;
font-size: 11px;
}
`;
export const TlBody = styled.div`
top: ${props => props.body.position || "30px"};
line-height: ${props => props.body.height || "18px"};
left: 50%;
font-size: 11px;
margin-top: -15px;
margin-left: -15px;
position: absolute;
display: block;
width: ${props => props.body.width || "18px"};
height: ${props => props.body.height || "18px"};
border-radius:50%;
border: ${props => props.body.border || "1px solid" + colors.brandBlue};
background: ${colors.whiteText};
pointer-events: none;
text-align: center;
vertical-align: middle;
`;
export const Tlfooter = styled.div`
position:relative;
color: ${colors.darkGrey};
font-size: 11px;
text-align: center;
`;
export const Progress = styled.div`
border-width: 0.5px;
border-style: solid;
border-color: ${props => props.borderColor || colors.brandBlue};
border-radius: none;
height:0px;
`;
export const ProgressBar = styled.div`
background-color: ${props => props.styles.color || colors.brandBlue};
`;
//# sourceMappingURL=Timeline.js.map