mirror of
https://github.com/hanzoai/cd-ui.git
synced 2026-10-30 20:42:45 +00:00
* feat: New components from Argo Rollotus UI in src/v2 directory Signed-off-by: Remington Breeze <[email protected]>
18 lines
563 B
TypeScript
18 lines
563 B
TypeScript
import * as React from 'react';
|
|
import ThemeDiv, {Theme} from '../theme-div/theme-div';
|
|
|
|
import './text.scss';
|
|
|
|
/**
|
|
* Themes children according to Theme Context, and styles them with appropriate font.
|
|
*/
|
|
export const Text = (props: {children: string | string[] | React.ReactNode; dark?: boolean; theme?: Theme; style?: React.CSSProperties}) => {
|
|
return (
|
|
<ThemeDiv className='text' theme={props.theme || (props.dark && Theme.Dark) || Theme.Light} style={props.style}>
|
|
{props.children}
|
|
</ThemeDiv>
|
|
);
|
|
};
|
|
|
|
export default Text;
|