vcc-ui
Version:
VCC UI is a collection of React UI Components that can be used for developing front-end applications at Volvo Car Corporation.
37 lines (30 loc) • 700 B
JavaScript
import React from 'react';
import PropTypes from 'prop-types';
import { useFela } from 'react-fela';
import { Flex } from '../flex';
import { getThemeStyle } from '../../get-theme-style';
const style = () => ({
padding: '16px 32px',
});
export const CardContent = React.forwardRef(({ children, ...props }, ref) => {
const { theme } = useFela();
const styleProps = {
theme,
};
return (
<Flex
ref={ref}
{...props}
extend={[
style(styleProps),
getThemeStyle('card-content', theme, styleProps),
]}
>
{children}
</Flex>
);
});
CardContent.displayName = 'CardContent';
CardContent.propTypes = {
children: PropTypes.node,
};