Skip to content

Commit

Permalink
Merge pull request #1882 from gluestack/fix/nativewind-heading
Browse files Browse the repository at this point in the history
Fix/nativewind heading
  • Loading branch information
Viraj-10 authored Mar 4, 2024
2 parents 4134b0e + 107e4bd commit 9993016
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 137 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ const headingStyle = tva({
'xs': 'text-sm',
},
},

// defaultProps: {
// size: 'lg',
// },
});

cssInterop(H4, { className: 'style' });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Heading | gluestack-ui | Installation, Usage, and API
title: gluestack-ui Heading Component | Installation, Usage, and API

description: Heading component gives you the ability to create headings for your page with different sizes and semantics from h1 to h6.

Expand Down Expand Up @@ -231,14 +231,7 @@ The Examples section provides visual representations of the different variants o

#### Heading Sizes

Heading component offers a range of sizes, including `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `4xl`, and `5xl`, allowing users to customize the size of the heading according to their design requirements. The size attribute determines which HTML tag (`h1` to `h6`) will be rendered.

- For `5xl`, `4xl`, and `3xl`, it renders `h1`.
- For `2xl`, it renders `h2`.
- For `xl`, it renders `h3`.
- For `lg`, it renders `h4`.
- For `md`, it renders `h5`.
- Finally, for `sm` and `xs`, it renders `h6`.
Heading component offers a range of sizes, including `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `4xl`, and `5xl`, allowing users to customize the size of the heading according to their design requirements.

<AppProvider>
<CodePreview
Expand Down Expand Up @@ -275,127 +268,4 @@ Heading component offers a range of sizes, including `xs`, `sm`, `md`, `lg`, `xl
argsType: {},
}}
/>
</AppProvider>

The Heading component also accepts some shorthands for basic quick styling.

<AppProvider>
<TableContainer>
<Table>
<Table.THead>
<Table.TR>
<Table.TH>
<Table.TText>Prop</Table.TText>
</Table.TH>
<Table.TH>
<Table.TText>Type</Table.TText>
</Table.TH>
<Table.TH>
<Table.TText>Default</Table.TText>
</Table.TH>
<Table.TH>
<Table.TText>Description</Table.TText>
</Table.TH>
</Table.TR>
</Table.THead>
<Table.TBody>
<Table.TR>
<Table.TD>
<Table.TText>
<InlineCode>bold</InlineCode>
</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>boolean</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>false</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>{`Used to make the text bold.`}</Table.TText>
</Table.TD>
</Table.TR>
<Table.TR>
<Table.TD>
<Table.TText>
<InlineCode>isTruncated</InlineCode>
</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>boolean</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>false</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>{`If true, it will render an ellipsis when the text exceeds the width of the viewport or maxWidth set.`}</Table.TText>
</Table.TD>
</Table.TR>
<Table.TR>
<Table.TD>
<Table.TText>
<InlineCode>italic</InlineCode>
</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>boolean</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>false</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>{`Used to make the text italic.`}</Table.TText>
</Table.TD>
</Table.TR>
<Table.TR>
<Table.TD>
<Table.TText>
<InlineCode>underline</InlineCode>
</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>boolean</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>false</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>{`Used underline the text.`}</Table.TText>
</Table.TD>
</Table.TR>
<Table.TR>
<Table.TD>
<Table.TText>
<InlineCode>strikeThrough</InlineCode>
</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>boolean</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>false</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>{`A horizontal line through the center of the text.`}</Table.TText>
</Table.TD>
</Table.TR>
<Table.TR>
<Table.TD>
<Table.TText>
<InlineCode>highlight</InlineCode>
</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>boolean</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>false</Table.TText>
</Table.TD>
<Table.TD>
<Table.TText>{`Used to highlight the text with a yellow background.`}</Table.TText>
</Table.TD>
</Table.TR>
</Table.TBody>
</Table>
</TableContainer>
</AppProvider>
</AppProvider>

0 comments on commit 9993016

Please sign in to comment.