Skip to content

Commit

Permalink
tech: export Card component from UI (#4710)
Browse files Browse the repository at this point in the history
<!--
PR title: tech / export Card component from UI
-->

## Describe your changes
- Export the card component from the `ui` package
- Fix a `z-index` issue with the Card aside

<!--
What changes are made?
If there are many changes, a list might be a good format.
If it makes sense, add screenshots and/or screen recordings here.
-->

## Justify why they are needed
Enable using `Card` in the `store` app

## Checklist before requesting a review

- [x] I have performed a self-review of my code
  • Loading branch information
Youakeem authored Sep 19, 2024
1 parent c197045 commit 5e333be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/ui/src/components/Card/Card.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ export const cardAside = style({
position: 'absolute !important',
top: cardPadding,
insetInlineEnd: cardPadding,
zIndex: 1,
})
3 changes: 2 additions & 1 deletion packages/ui/src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Slot } from '@radix-ui/react-slot'
import { type RecipeVariants } from '@vanilla-extract/recipes'
import clsx from 'clsx'
import { type ComponentProps, type PropsWithChildren } from 'react'
import { Heading, Text } from 'ui'
import { Heading } from '../Heading/Heading'
import { Text } from '../Text/Text'
import { cardAside, cardHeader, cardRoot } from './Card.css'

type RootStyleProps = RecipeVariants<typeof cardRoot>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export { Space } from './components/Space'
export { Button, type ButtonProps } from './components/Button/Button'
export { IconButton } from './components/Button/IconButton'
export { Tooltip } from './components/Tooltip/Tooltip'

export { Card } from './components/Card/Card'
export { InputBase } from './components/InputBase'
export type { InputBaseProps } from './components/InputBase'
export { Heading } from './components/Heading/Heading'
Expand Down

0 comments on commit 5e333be

Please sign in to comment.