Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate text and headings to tailwind #13386

Merged
merged 9 commits into from
Jul 16, 2024
6 changes: 6 additions & 0 deletions src/@chakra-ui/components/Accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ const { defineMultiStyleConfig, definePartsStyle } =
createMultiStyleConfigHelpers(accordionAnatomy.keys)

const baseStyle = definePartsStyle({
container: {
'& > :is(h2, h3)': {
fontSize: "initial",
fontWeight: 'initial'
}
},
button: {
py: "2",
px: { base: "2", md: "4" },
Expand Down
18 changes: 0 additions & 18 deletions src/@chakra-ui/styles.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/@chakra-ui/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { extendBaseTheme, type ThemeConfig } from "@chakra-ui/react"
import components from "./components"
import foundations from "./foundations"
import semanticTokens from "./semanticTokens"
import styles from "./styles"

const config: ThemeConfig = {
cssVarPrefix: "eth",
Expand All @@ -19,7 +18,6 @@ const config: ThemeConfig = {
*/
const theme = {
config,
styles,
...foundations,
semanticTokens,
components,
Expand Down
174 changes: 0 additions & 174 deletions src/components/BaseStories/Text.stories.tsx

This file was deleted.

91 changes: 0 additions & 91 deletions src/components/Heading/Heading.stories.tsx

This file was deleted.

52 changes: 52 additions & 0 deletions src/components/ui/__stories__/Heading.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import * as React from "react"
import { Meta, StoryObj } from "@storybook/react"

import { Center, Stack } from "../flex"

const meta = {
title: "Atoms / Typography / Heading",
parameters: {
layout: null,
chromatic: {
modes: {
md: {
viewport: "md",
},
"2xl": {
viewport: "2xl",
},
},
},
},
decorators: [
(Story) => (
<Center className='flex-col min-h-[100vh]'>
<Story />
</Center>
),
],
} satisfies Meta

export default meta

type Story = StoryObj<typeof meta>

const headings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const

export const Heading: Story = {
render: () => (
<>
<div>
Adjust the viewport to below &quot;md&quot; to see the font size and
line height change
</div>
<Stack>
{headings.map((Heading) => (
<Heading key={Heading}>
{`${Heading} base component`}
</Heading>
))}
</Stack>
</>
),
}
Loading
Loading