@dynamic-labs/sdk-react-core
Version:
A React SDK for implementing wallet web3 authentication and authorization to your website.
54 lines (49 loc) • 2.38 kB
JavaScript
'use client'
;
Object.defineProperty(exports, '__esModule', { value: true });
var _tslib = require('../../../../_virtual/_tslib.cjs');
var jsxRuntime = require('react/jsx-runtime');
var classNames = require('../../utils/functions/classNames/classNames.cjs');
const Typography = (_a) => {
var { as: Tag = 'p', variant, weight, color = 'primary', transform, className = '', truncate = false, style } = _a, props = _tslib.__rest(_a, ["as", "variant", "weight", "color", "transform", "className", "truncate", "style"]);
const variantClassNameMap = {
body_mini: 'typography--body-mini',
body_normal: 'typography--body-normal',
body_small: 'typography--body-small',
button_primary: 'typography--button-primary',
button_secondary: 'typography--button-secondary',
button_tertiary: 'typography--button-tertiary',
numbers_big: 'typography--numbers-big',
numbers_display: 'typography--numbers-display',
numbers_medium: 'typography--numbers-medium',
title: 'typography--title',
};
const weightClassNameMap = {
bold: 'typography--bold',
medium: 'typography--medium',
regular: 'typography--regular',
};
const colorClassNameMap = {
'alert-1': 'typography--alert-1',
'brand-primary': 'typography--brand-primary',
'current-color': 'typography--current-color',
'error-1': 'typography--dynamic-error-1',
'error-2': 'typography--dynamic-error-2',
'green-1': 'typography--connection-green-1',
inherit: 'typography--inherit',
link: 'typography--link',
primary: 'typography--primary',
secondary: 'typography--secondary',
tertiary: 'typography--tertiary',
tooltip: 'typography--tooltip',
white: 'typography--white',
};
const transformClassNameMap = {
uppercase: 'typography--uppercase',
};
const effectiveClassName = classNames.classNames('typography', variant ? variantClassNameMap[variant] : '', weight ? weightClassNameMap[weight] : '', color ? colorClassNameMap[color] : '', transform ? transformClassNameMap[transform] : '', {
'typography--truncate': truncate,
}, className);
return jsxRuntime.jsx(Tag, Object.assign({ style: style, className: effectiveClassName }, props));
};
exports.Typography = Typography;