Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cute-carrots-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ultraviolet/plus": minor
---

Refactor component `FAQ` to use vanilla extract instead of Emotion
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@

exports[`fAQ > should work with default props 1`] = `
<DocumentFragment>
.emotion-0 {
padding: 1rem;
text-align: left;
}

<div
<div
data-testid="testing"
>
<div
class="emotion-0 emotion-1 uv_1p7tz3i1"
class="styles__5imqkb0 uv_1p7tz3i1"
data-disabled="false"
data-is-active="false"
>
Expand Down Expand Up @@ -39,16 +34,11 @@ exports[`fAQ > should work with default props 1`] = `

exports[`fAQ > should work with illustrationTest 1`] = `
<DocumentFragment>
.emotion-0 {
padding: 1rem;
text-align: left;
}

<div
<div
data-testid="testing"
>
<div
class="emotion-0 emotion-1 uv_1p7tz3i1"
class="styles__5imqkb0 uv_1p7tz3i1"
data-disabled="false"
data-is-active="false"
>
Expand Down Expand Up @@ -82,16 +72,11 @@ exports[`fAQ > should work with illustrationTest 1`] = `

exports[`fAQ > should work with notes 1`] = `
<DocumentFragment>
.emotion-0 {
padding: 1rem;
text-align: left;
}

<div
<div
data-testid="testing"
>
<div
class="emotion-0 emotion-1 uv_1p7tz3i1"
class="styles__5imqkb0 uv_1p7tz3i1"
data-disabled="false"
data-is-active="false"
>
Expand Down Expand Up @@ -124,16 +109,11 @@ exports[`fAQ > should work with notes 1`] = `

exports[`fAQ > should work with productIconName 1`] = `
<DocumentFragment>
.emotion-0 {
padding: 1rem;
text-align: left;
}

<div
<div
data-testid="testing"
>
<div
class="emotion-0 emotion-1 uv_1p7tz3i1"
class="styles__5imqkb0 uv_1p7tz3i1"
data-disabled="false"
data-is-active="false"
>
Expand Down
11 changes: 3 additions & 8 deletions packages/plus/src/components/FAQ/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
'use client'

import styled from '@emotion/styled'
import * as ProductIcon from '@ultraviolet/icons/product'
import { Bullet, Card, Stack, Text } from '@ultraviolet/ui'
import type { PascalToCamelCaseWithoutSuffix } from '../../types'

const StyledCard = styled(Card)`
padding: ${({ theme }) => theme.space['2']};
text-align: left;
`
import { faq } from './styles.css'

type FAQProps = {
description: string
Expand Down Expand Up @@ -37,7 +32,7 @@ export const FAQ = ({
: null

return (
<StyledCard>
<Card className={faq}>
<Stack direction="row" gap={2}>
<div>
{!productIconName && illustrationText ? (
Expand All @@ -59,6 +54,6 @@ export const FAQ = ({
</Text>
</div>
</Stack>
</StyledCard>
</Card>
)
}
7 changes: 7 additions & 0 deletions packages/plus/src/components/FAQ/styles.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { theme } from '@ultraviolet/themes'
import { style } from '@vanilla-extract/css'

export const faq = style({
padding: theme.space[2],
textAlign: 'left',
})
Loading