Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/@buffetjs/core/src/components/Text/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import styled from 'styled-components';
import PropTypes from 'prop-types';
import colors from '../../theme/colors';
const Text = styled.p`
margin: 0;
line-height: ${({ lineHeight }) => lineHeight};
color: ${({ theme, color }) => theme.main.colors[color] || color};
font-size: ${({ theme, fontSize }) => theme.main.sizes.fonts[fontSize]};
font-weight: ${({ theme, fontWeight }) => theme.main.fontWeights[fontWeight]};
text-transform: ${({ textTransform }) => textTransform};
${({ ellipsis }) =>
ellipsis &&
`
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
`}
`;
Text.defaultProps = {
color: 'greyDark',
ellipsis: false,
fontSize: 'md',
fontWeight: 'regular',
lineHeight: 'normal',
textTransform: 'none',
// TODO : This is temporary
theme: {
main: {
colors,
sizes: {
fonts: {
xs: '11px',
sm: '12px',
md: '13px',
lg: '18px',
xl: '24px',
},
},
fontWeights: {
regular: 400,
semiBold: 500,
bold: 600,
black: 900,
},
},
},
};
Text.propTypes = {
color: PropTypes.string,
ellipsis: PropTypes.bool,
fontSize: PropTypes.string,
fontWeight: PropTypes.string,
lineHeight: PropTypes.string,
textTransform: PropTypes.string,
// eslint-disable-next-line react/forbid-prop-types
theme: PropTypes.object,
};
export default Text;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0041 ]-- |