UNPKG

@axeptio/design-system

Version:
47 lines (40 loc) 1.04 kB
import styled from 'styled-components'; import PropTypes from 'prop-types'; const Root = styled.div` display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; background: ${props => props.theme.colors.secondary}; .value { display: block; font-family: ${props => props.theme.fonts.title}; font-size: clamp(50px, 4vw, 70px); font-weight: 700; line-height: 1; color: #fff; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-image: linear-gradient(140deg, #fac6a1, #a9ddd7 58%, #afc2e7 76%); } .label { font-size: 17px; line-height: 1; text-align: left; color: ${props => props.theme.colors.grey.v400}; } `; const KPI = ({ value, label }) => ( <Root> <span className="value">{value}</span> <span className="label">{label}</span> </Root> ); KPI.propTypes = { value: PropTypes.string, label: PropTypes.string }; export default KPI;