Files
Remington BreezeandGitHub 241596c14a feat: New components from Argo Rollouts UI in src/v2 directory (#100)
* feat: New components from Argo Rollotus UI in src/v2 directory

Signed-off-by: Remington Breeze <[email protected]>
2021-06-16 17:07:21 -07:00

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;