Skip to content

Commit c175e35

Browse files
authored
Merge pull request #13386 from TylerAPfledderer/feat/shadcn-migrate-text
feat: migrate text and headings to tailwind
2 parents 76652a2 + 2fa34a7 commit c175e35

File tree

11 files changed

+329
-328
lines changed

11 files changed

+329
-328
lines changed

src/@chakra-ui/components/Accordion.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ const { defineMultiStyleConfig, definePartsStyle } =
55
createMultiStyleConfigHelpers(accordionAnatomy.keys)
66

77
const baseStyle = definePartsStyle({
8+
container: {
9+
'& > :is(h2, h3)': {
10+
fontSize: "initial",
11+
fontWeight: 'initial'
12+
}
13+
},
814
button: {
915
py: "2",
1016
px: { base: "2", md: "4" },

src/@chakra-ui/styles.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/@chakra-ui/theme.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { extendBaseTheme, type ThemeConfig } from "@chakra-ui/react"
33
import components from "./components"
44
import foundations from "./foundations"
55
import semanticTokens from "./semanticTokens"
6-
import styles from "./styles"
76

87
const config: ThemeConfig = {
98
cssVarPrefix: "eth",
@@ -19,7 +18,6 @@ const config: ThemeConfig = {
1918
*/
2019
const theme = {
2120
config,
22-
styles,
2321
...foundations,
2422
semanticTokens,
2523
components,

src/components/BaseStories/Text.stories.tsx

Lines changed: 0 additions & 174 deletions
This file was deleted.

src/components/Heading/Heading.stories.tsx

Lines changed: 0 additions & 91 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import * as React from "react"
2+
import { Meta, StoryObj } from "@storybook/react"
3+
4+
import { Center, Stack } from "../flex"
5+
6+
const meta = {
7+
title: "Atoms / Typography / Heading",
8+
parameters: {
9+
layout: null,
10+
chromatic: {
11+
modes: {
12+
md: {
13+
viewport: "md",
14+
},
15+
"2xl": {
16+
viewport: "2xl",
17+
},
18+
},
19+
},
20+
},
21+
decorators: [
22+
(Story) => (
23+
<Center className='flex-col min-h-[100vh]'>
24+
<Story />
25+
</Center>
26+
),
27+
],
28+
} satisfies Meta
29+
30+
export default meta
31+
32+
type Story = StoryObj<typeof meta>
33+
34+
const headings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const
35+
36+
export const Heading: Story = {
37+
render: () => (
38+
<>
39+
<div>
40+
Adjust the viewport to below &quot;md&quot; to see the font size and
41+
line height change
42+
</div>
43+
<Stack>
44+
{headings.map((Heading) => (
45+
<Heading key={Heading}>
46+
{`${Heading} base component`}
47+
</Heading>
48+
))}
49+
</Stack>
50+
</>
51+
),
52+
}

0 commit comments

Comments
 (0)