DocSpace-buildtools/web/ASC.Web.Storybook/stories/text/body/README.md
2019-08-08 17:48:07 +03:00

2.2 KiB

Text

Usage

import { Text } from 'asc-web-components';

<Text.Body>

Component that displays plain text

Usage

    <Text.Body as='p' title='Some title'>
        Some text
    </Text.Body>

If you need to override styles add forwardedAs instead of as

    const StyledText = styled(Text.Body)`
        &:hover{
            border-bottom: 1px dotted;
        }
    `;

    <StyledText forwardedAs='span' title='Some title'>
        Some text
    </StyledText>

Properties

Props Type Required Values Default Description
fontSize number - - 13 Sets the font size
as string - - p Sets the tag through which to render the component
title bool - - - Title
truncate bool - - false Disables word wrapping
isInline bool - - false Sets the 'display: inline-block' property
color string - - #333333 Specifies the text color
isBold bool - - false Sets the font weight
isItalic bool - - false Sets the font style
backgroundColor string - - - Sets background color