DocSpace-buildtools/web/ASC.Web.Storybook/stories/text/body/README.md
2019-08-13 11:39:16 +03:00

2.4 KiB
Raw Blame History

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
display string - - - Sets the 'display' property
color string - - #333333 Specifies the text color
isBold bool - - false Sets font weight value to bold
isItalic bool - - false Sets the font style
backgroundColor string - - - Sets background color
fontWeight number - - - Sets the font weight