![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@commercetools-uikit/text
Advanced tools
// NOTE: the main import is not a React component, instead you need to use one
// of the types defined in the component.
import Text from '@commercetools-uikit/text';
<Text.Headline>
Wraps the given text in the given HTML header size
.
<Text.Headline as="h1">{'The title'}</Text.Headline>
Props | Type | Required | Values | Default | Description |
---|---|---|---|---|---|
as | String | ✅ | ['h1', 'h2', 'h3'] | - | - |
children | PropTypes.node | ✅ (*) | - | - | - |
intlMessage | intl message | ✅ (*) | - | - | An intl message object that will be rendered with FormattedMessage |
title | String | - | - | - | Text to show in a tooltip on hover over the element |
truncate | Bool | - | - | false | Option for truncate content in case the screen has small width |
elementType | String | - | ['h1', 'h2', 'h3'] | - | ⚠️ Deprecated |
*
:children
is required only ifintlMessage
is not provided
The component further forwards all data-
attributes to the underlying component.
Title of pages.
<Text.Subheadline>
Wraps the given text in the given HTML header size
.
<Text.Subheadline elementType="h4">{'The subtitle'}</Text.Subheadline>
Props | Type | Required | Values | Default |
---|---|---|---|---|
as | String | ✅ | ['h4', 'h5'] | - |
isBold | Boolean | - | - | false |
tone | String | - | ['primary', 'secondary', 'information', 'positive', 'negative'] | - |
children | PropTypes.node | ✅ (*) | - | - |
intlMessage | intl message | ✅ (*) | - | - |
title | String | - | - | - |
truncate | Bool | - | - | false |
elementType | String | - | ['h4', 'h5'] | - |
*
:children
is required only ifintlMessage
is not provided
The component further forwards all data-
attributes to the underlying component.
Subtitle of pages.
<Text.Wrap>
Wraps the given text in its container. And for long text, text will be wrapped to new line.
<Text.Wrap>{'Sooo long text'}</Text.Wrap>
When we render value that may be vey long, and we prefer to wrap text to new line after it exceeds its wrapper's width.
<Text.Body>
Wraps the given text in a <p>
element, for normal content.
<Text.Body>{'This is a content'}</Text.Body>
Props | Type | Required | Values | Default |
---|---|---|---|---|
as | String | - | ['p', 'span'] | - |
isBold | Boolean | - | - | false |
isItalic | Boolean | - | - | false |
tone | String | - | ['primary', 'secondary', 'information', 'positive', 'negative', 'inverted'] | - |
children | PropTypes.node | ✅ (*) | - | - |
intlMessage | intl message | ✅ (*) | - | - |
title | String | - | - | - |
truncate | Bool | - | - | false |
isInline | Bool | - | - | false |
*
:children
is required only ifintlMessage
is not provided
The component further forwards all data-
attributes to the underlying component.
Content text in general.
<Text.Detail>
Wraps the given text in a <small>
semantic tag. It accepts a tone
prop to
properly style the text.
<Text.Detail>{'This would be something small'}</Text.Detail>
<Text.Detail tone="secondary">{'This would be something small with the secondary tone applied'}</Text.Detail>
Props | Type | Required | Values | Default |
---|---|---|---|---|
isBold | Boolean | - | - | false |
isItalic | Boolean | - | - | false |
tone | String | - | ['primary', 'secondary', 'information', 'positive', 'negative', 'warning''] | - |
children | PropTypes.node | ✅ (*) | - | - |
intlMessage | intl message | ✅ (*) | - | - |
title | String | - | - | - |
truncate | Bool | - | - | false |
isInline | Bool | - | - | false |
*
:children
is required only ifintlMessage
is not provided
The component further forwards all data-
attributes to the underlying component.
Details text of form boxes.
FAQs
The Text component implements the typography elements such as headings, paragraphs, etc.
The npm package @commercetools-uikit/text receives a total of 17 weekly downloads. As such, @commercetools-uikit/text popularity was classified as not popular.
We found that @commercetools-uikit/text demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.